00001 //=========================================================================== 00002 /* 00003 This file is part of the CHAI 3D visualization and haptics libraries. 00004 Copyright (C) 2003-2009 by CHAI 3D. All rights reserved. 00005 00006 This library is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License("GPL") version 2 00008 as published by the Free Software Foundation. 00009 00010 For using the CHAI 3D libraries with software that can not be combined 00011 with the GNU GPL, and for taking advantage of the additional benefits 00012 of our support services, please contact CHAI 3D about acquiring a 00013 Professional Edition License. 00014 00015 \author <http://www.chai3d.org> 00016 \author Francois Conti 00017 \version 2.0.0 $Rev: 250 $ 00018 */ 00019 //=========================================================================== 00020 00021 //--------------------------------------------------------------------------- 00022 #ifndef CGenericCollisionH 00023 #define CGenericCollisionH 00024 //--------------------------------------------------------------------------- 00025 #include "collisions/CCollisionBasics.h" 00026 //--------------------------------------------------------------------------- 00027 using std::vector; 00028 //--------------------------------------------------------------------------- 00029 00030 //=========================================================================== 00038 //=========================================================================== 00039 00040 //=========================================================================== 00049 //=========================================================================== 00050 class cGenericCollision 00051 { 00052 public: 00053 00054 //----------------------------------------------------------------------- 00055 // CONSTRUCTOR & DESTRUCTOR: 00056 //----------------------------------------------------------------------- 00057 00059 cGenericCollision(); 00060 00062 virtual ~cGenericCollision() {}; 00063 00064 00065 //----------------------------------------------------------------------- 00066 // METHODS: 00067 //----------------------------------------------------------------------- 00068 00070 virtual void initialize(double a_radius = 0) {}; 00071 00073 virtual void render() {}; 00074 00076 virtual bool computeCollision(cVector3d& a_segmentPointA, 00077 cVector3d& a_segmentPointB, 00078 cCollisionRecorder& a_recorder, 00079 cCollisionSettings& a_settings) 00080 { return (false); } 00081 00083 void setDisplayDepth(int a_depth) { m_displayDepth = a_depth; } 00084 00086 double getDisplayDepth() const { return (m_displayDepth); } 00087 00088 00089 //----------------------------------------------------------------------- 00090 // MEMBERS: 00091 //----------------------------------------------------------------------- 00092 00094 cMaterial m_material; 00095 00096 00097 protected: 00098 00099 //----------------------------------------------------------------------- 00100 // MEMBERS: 00101 //----------------------------------------------------------------------- 00102 00107 int m_displayDepth; 00108 }; 00109 00110 //--------------------------------------------------------------------------- 00111 #endif 00112 //--------------------------------------------------------------------------- 00113