- Timestamp:
- Dec 4, 2005, 11:35:16 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc
r5922 r5923 198 198 } 199 199 } 200 for(int i = 0; i < 3; ++i) 201 { 202 box.covarianceMatrix[i][0] = covariance[i][0]; 203 box.covarianceMatrix[i][1] = covariance[i][1]; 204 box.covarianceMatrix[i][2] = covariance[i][2]; 205 } 206 box.center = center; 200 207 201 208 … … 204 211 bool vertexFound; //!< vertex found flag 205 212 Vector arithCenter; //!< aritmetical center 206 207 213 208 214 /* calculate the arithmetical center of the box */ … … 231 237 arithCenter += *tmpVec; 232 238 } 233 arithCenter.debug();234 239 box.arithCenter = arithCenter / vertIndexVector.size(); 235 240 236 241 237 242 238 243 /* debug output section*/ 239 244 PRINTF(3)("\nOBB Covariance Matrix:\n"); 240 245 for(int j = 0; j < 3; ++j) … … 248 253 } 249 254 PRINTF(3)("\nWeighteed OBB Center:\n\t\t%11.2f\t %11.2f\t %11.2f\n", center.x, center.y, center.z); 250 PRINTF(3)("\nArithmetical OBB Center:\n\t\t%11.2f\t %11.2f\t %11.2f\n", arithCenter.x, arithCenter.y,arithCenter.z);255 PRINTF(3)("\nArithmetical OBB Center:\n\t\t%11.2f\t %11.2f\t %11.2f\n", box.arithCenter.x, box.arithCenter.y, box.arithCenter.z); 251 256 252 257 /* write back the covariance matrix data to the object oriented bouning box */ 253 for(int i = 0; i < 3; ++i)254 {255 box.covarianceMatrix[i][0] = covariance[i][0];256 box.covarianceMatrix[i][1] = covariance[i][1];257 box.covarianceMatrix[i][2] = covariance[i][2];258 }259 box.center = center;260 258 } 261 259
Note: See TracChangeset
for help on using the changeset viewer.