Changeset 4576 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
- Timestamp:
- Jun 10, 2005, 2:18:01 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4573 r4576 166 166 vectors 167 167 */ 168 169 168 Matrix V(3,3); //!< for eigenvectors 170 169 DiagonalMatrix D(3); //!< for eigenvalues 171 170 SymmetricMatrix C(3); //!< for the covariance symmetrical matrix 172 Vector** axis ;//!< the references to the obb axis171 Vector** axis = new Vector*[3]; //!< the references to the obb axis 173 172 174 173 C(1,1) = covariance[0][0]; … … 196 195 } 197 196 198 //axis1 = 199 197 axis[0] = new Vector(V(1, 1), V(2, 1), V(3, 1)); 198 axis[1] = new Vector(V(1, 2), V(2, 2), V(3, 2)); 199 axis[2] = new Vector(V(1, 3), V(2, 3), V(3, 3)); 200 box->axis = axis; 201 202 printf("eigenvector: %f, %f, %f\n", V(1, 1), V(2, 1), V(3, 1)); 203 printf("eigenvector: %f, %f, %f\n", V(1, 2), V(2, 2), V(3, 2)); 204 printf("eigenvector: %f, %f, %f\n", V(1, 3), V(2, 3), V(3, 3)); 205 206 207 /* now get the axis length */ 208 Line ax1(*box->center, *box->axis[0]); //!< the the axis representation 209 Line ax2(*box->center, *box->axis[1]); //!< the the axis representation 210 Line ax3(*box->center, *box->axis[2]); //!< the the axis representation 211 212 213 200 214 } 201 215 … … 208 222 for(int i = 0; i < 3; ++i) 209 223 { 210 if( aLength < box->axis[i] .len())224 if( aLength < box->axis[i]->len()) 211 225 { 212 aLength = box->axis[i] .len();226 aLength = box->axis[i]->len(); 213 227 axisNr = i; 214 228 }
Note: See TracChangeset
for help on using the changeset viewer.