Changeset 4616 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection
- Timestamp:
- Jun 13, 2005, 9:17:55 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bounding_volume.h
r4588 r4616 3 3 \brief Definition of a bounding volume for collision detection algorithms 4 4 5 */5 */ 6 6 7 7 #ifndef _BOUNDING_VOLUME_H … … 18 18 class BoundingVolume : public BaseObject { 19 19 20 public:21 BoundingVolume();22 virtual ~BoundingVolume();20 public: 21 BoundingVolume(); 22 virtual ~BoundingVolume(); 23 23 24 inline const Vector* getCenter() const { return this->center; }24 inline const Vector* getCenter() const { return this->center; } 25 25 26 sVec3D* getVertices() const { return this->vertices; }27 virtual void mergeWith(const BoundingVolume &bv) = NULL;26 sVec3D* getVertices() const { return this->vertices; } 27 virtual void mergeWith(const BoundingVolume &bv) = NULL; 28 28 29 virtual void drawBV(int currentDepth, const int depth) const = NULL;30 virtual void drawBVPolygon(int currentDepth, const int depth) const = NULL;31 virtual void drawBVBlended(int currentDepth, const int depth) const = NULL;29 virtual void drawBV(int currentDepth, const int depth) const = NULL; 30 virtual void drawBVPolygon(int currentDepth, const int depth) const = NULL; 31 virtual void drawBVBlended(int currentDepth, const int depth) const = NULL; 32 32 33 33 34 public:35 Vector* center; //!< Center point of box34 public: 35 Vector* center; //!< Center point of box 36 36 37 sVec3D* vertices; //!< if CD_STORE_VERTICES enabled, this is the place, where the vert. will be sotred38 int numOfVertices; //!< number of vertices in the vertices buffer37 sVec3D* vertices; //!< if CD_STORE_VERTICES enabled, this is the place, where the vert. will be sotred 38 int numOfVertices; //!< number of vertices in the vertices buffer 39 39 }; 40 40 -
orxonox/trunk/src/lib/collision_detection/obb_tree.cc
r4615 r4616 21 21 #include "debug.h" 22 22 #include "compiler.h" 23 #include "material.h" 23 24 24 25 using namespace std; 25 26 27 28 Material* OBBTree::material = NULL; 26 29 27 30 /** … … 30 33 OBBTree::OBBTree () 31 34 { 32 this->setClassID(CL_OBB_TREE, "OBBTree"); 33 35 this->setClassID(CL_OBB_TREE, "OBBTree"); 36 material = new Material("Tree"); 37 material->setIllum(3); 38 material->setAmbient(1.0, 1.0, 1.0); 34 39 } 35 40 -
orxonox/trunk/src/lib/collision_detection/obb_tree.h
r4551 r4616 1 /*! 1 /*! 2 2 \file obb_tree.h 3 3 \brief Definition of an obb tree (object oriented Bounding Box) … … 10 10 #include "bv_tree.h" 11 11 #include "abstract_model.h" 12 #include "material.h" 12 13 14 class Material; 13 15 class OBBTreeNode; 14 16 … … 16 18 class OBBTree : public BVTree { 17 19 18 public:19 OBBTree();20 virtual ~OBBTree();20 public: 21 OBBTree(); 22 virtual ~OBBTree(); 21 23 22 virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length);23 virtual void flushTree();24 virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length); 25 virtual void flushTree(); 24 26 25 void collideWith(const OBBTree &tree);27 void collideWith(const OBBTree &tree); 26 28 27 virtual void drawBV(int currentDepth, const int depth) const;28 virtual void drawBVPolygon(int currentDepth, const int depth) const;29 virtual void drawBVBlended(int currentDepth, const int depth) const;29 virtual void drawBV(int currentDepth, const int depth) const; 30 virtual void drawBVPolygon(int currentDepth, const int depth) const; 31 virtual void drawBVBlended(int currentDepth, const int depth) const; 30 32 31 void debug();33 void debug(); 32 34 33 private: 34 OBBTreeNode* rootNode; //!< reference to the root node of the tree 35 public: 36 static Material* material; 37 38 39 private: 40 OBBTreeNode* rootNode; //!< reference to the root node of the tree 35 41 36 42 }; -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4615 r4616 19 19 #include "list.h" 20 20 #include "obb.h" 21 #include "obb_tree.h" 21 22 #include "vector.h" 22 23 #include "abstract_model.h" … … 402 403 void OBBTreeNode::drawBVPolygon(int currentDepth, const int depth) const 403 404 { 405 406 OBBTree::material->select(); 404 407 405 408 /* draw world axes */
Note: See TracChangeset
for help on using the changeset viewer.