Changeset 5705 in orxonox.OLD for branches/collision_detection/src/lib/collision_detection/obb_tree_node.h
- Timestamp:
- Nov 22, 2005, 2:22:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collision_detection/src/lib/collision_detection/obb_tree_node.h
r5704 r5705 32 32 virtual inline const BoundingVolume* getBV() const { return (BoundingVolume*)this->bvElement; } 33 33 34 34 35 virtual void spawnBVTree(const int depth, const sVec3D *verticesList, unsigned int length); 35 36 virtual void spawnBVTree(const int depth, const modelInfo& modelInf, … … 37 38 38 39 virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB); 39 40 40 virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const; 41 42 41 void debug() const; 43 42 43 44 44 private: 45 void calculateBoxCovariance(OBB* box, const sVec3D* verticesList, unsigned int length);46 45 void calculateBoxEigenvectors(OBB* box, const sVec3D* verticesList, unsigned int length); 47 46 void calculateBoxAxis(OBB* box, const sVec3D* verticesList, unsigned int length); … … 51 50 void calculateBoxAxis(OBB* box, const modelInfo& modelInf, const int* triangleIndexes, unsigned int length); 52 51 53 54 52 void forkBox(OBB* box); 55 53 56 54 bool overlapTest(OBB* boxA, OBB* boxB, WorldEntity* nodeA, WorldEntity* nodeB); 57 55 56 58 57 protected: 59 58 OBB* bvElement; //!< the obb element … … 61 60 OBBTreeNode* nodeRight; //!< ref to the right tree node 62 61 62 63 63 private: 64 64 unsigned int treeIndex; //!< Index number of the BV in the tree 65 int depth; //!< the depth of the node in the tree 66 const OBBTree* obbTree; //!< reference to the obb tree 67 65 68 const sVec3D* vertices; //!< pointer to the vertices data 66 69 int numOfVertices; //!< number of vertices in vertices data 67 int depth; //!< the depth of the node in the tree68 const OBBTree* obbTree; //!< reference to the obb tree69 70 Plane separationPlane; //!< the separation plane of the obb 70 71 const sVec3D* sepPlaneCenter; //!< only needed to draw plane … … 81 82 static float* eigvlMat; 82 83 static int* rotCount; 84 83 85 }; 84 86
Note: See TracChangeset
for help on using the changeset viewer.