Changeset 4562 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection
- Timestamp:
- Jun 9, 2005, 12:37:13 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bounding_volume.cc
r4560 r4562 29 29 this->setClassID(CL_BOUNDING_VOLUME, "BoundingVolume"); 30 30 this->center = new Vector(); 31 32 31 } 33 32 -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4560 r4562 75 75 Vector p, q, r; //!< holder of the polygon data, much more conveniant to work with Vector than sVec3d 76 76 Vector t1, t2; //!< temporary values 77 float ** covariance;//!< the covariance matrix77 float covariance[3][3]; //!< the covariance matrix 78 78 79 79 this->numOfVertices = length; 80 80 this->vertices = verticesList; 81 81 82 82 83 /* fist compute all the convex hull face/facelets and centroids */ … … 94 95 face += facelet[i]; 95 96 96 97 97 /* calculate the cetroid of the hull triangles */ 98 98 centroid[i] = (p + q + r) * 1/3; … … 102 102 /* take the average of the centroid sum */ 103 103 center /= face; 104 105 104 106 105 107 /* now calculate the covariance matrix - if not written in three for-loops, it would compute faster: minor */ … … 119 121 } 120 122 } 123 121 124 122 125 printf("Covariance Matrix:\n");
Note: See TracChangeset
for help on using the changeset viewer.