Changeset 4543 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection
- Timestamp:
- Jun 7, 2005, 6:20:27 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bv_tree_node.h
r4542 r4543 23 23 virtual ~BVTreeNode(); 24 24 25 virtual void spawnBVTree(const int depth, tList<sVec3D> *verticesList) = NULL;25 virtual void spawnBVTree(const int depth, sVec3D *verticesList, const int length ) = NULL; 26 26 27 27 virtual BoundingVolume* getBV(int index) const = NULL; -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4542 r4543 19 19 #include "list.h" 20 20 #include "obb.h" 21 22 #include <math.h> 21 23 22 24 using namespace std; … … 49 51 \param verticesList: the list of vertices of the object - each vertices triple is interpreted as a triangle 50 52 */ 51 void OBBTreeNode::spawnBVTree(const int depth, tList<sVec3D> *verticesList)53 void OBBTreeNode::spawnBVTree(const int depth, const sVec3D *verticesList, const int length) 52 54 { 53 float area[verticesList->getSize()];//!< surface area of the i'th triangle of the convex hull54 float areaTotal;//!< surface area of the entire convex hull55 float centroid[ verticesList->getSize()];//!< centroid of the i'th convex hull55 float facelet[length]; //!< surface area of the i'th triangle of the convex hull 56 float face; //!< surface area of the entire convex hull 57 float centroid[length]; //!< centroid of the i'th convex hull 56 58 OBB* obb = new OBB(); //!< the new obb to add 57 59 58 /* fist compute all the convex hull particles */59 for(int i = 0; i < verticesList->getSize(); ++i)60 /* fist compute all the convex hull facelets */ 61 for(int i = 0; i < length; ++i) 60 62 { 61 63 facelet[i] = 0.5f * fabs(5.0); 62 64 } 63 65 } -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.h
r4542 r4543 22 22 virtual ~OBBTreeNode(); 23 23 24 virtual void spawnBVTree(const int depth, tList<sVec3D> *verticesList);24 virtual void spawnBVTree(const int depth, const sVec3D *verticesList, const int length); 25 25 26 26 BoundingVolume* getBV(int index) const { return this->bvElement; }
Note: See TracChangeset
for help on using the changeset viewer.