- Timestamp:
- May 6, 2006, 1:27:07 PM (19 years ago)
- Location:
- branches/cd/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cd/src/lib/collision_detection/obb_tree_node.cc
r7545 r7554 159 159 float covariance[3][3] = {0,0,0, 0,0,0, 0,0,0};//!< the covariance matrix 160 160 sVec3D* tmpVec = NULL; //!< a temp saving place for sVec3Ds 161 162 161 163 162 /* fist compute all the convex hull face/facelets and centroids */ … … 361 360 for( int i = 0; i < 3; ++i) 362 361 { 363 centerOffset[i] = ( maxLength[i] + minLength[i]) / 2.0f; // min length is negatie364 box.halfLength[i] = (maxLength[i] - minLength[i]) / 2.0f;// min length is negative362 centerOffset[i] = (fabs(maxLength[i]) - fabs(minLength[i])) / 2.0f; // min length is negatie 363 box.halfLength[i] = (maxLength[i] - minLength[i]) / 2.0f; // min length is negative 365 364 } 366 365 box.center.x += centerOffset[0]; … … 369 368 370 369 PRINTF(3)("\n"); 371 PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f)\n", box.halfLength[0], maxLength[0], minLength[0]); 372 PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f)\n", box.halfLength[1], maxLength[1], minLength[1]); 373 PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f)\n", box.halfLength[2], maxLength[2], minLength[2]); 374 375 376 // box.halfLength[0] = halfLength[0]; 377 // box.halfLength[1] = halfLength[1]; 378 // box.halfLength[2] = halfLength[2]; 370 PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[0], maxLength[0], minLength[0], centerOffset[0]); 371 PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[1], maxLength[1], minLength[1], centerOffset[1] ); 372 PRINT(3)("\tAxis halflength x: %11.2f (max: %11.2f, \tmin: %11.2f), offset: %11.2f\n", box.halfLength[2], maxLength[2], minLength[2], centerOffset[2]); 379 373 } 380 374 … … 677 671 { 678 672 /* this function can be used to draw the triangles and/or the points only */ 679 if( drawMode & DRAW_MODEL || drawMode & DRAW_ALL)680 { 681 if( !(drawMode & DRAW_SINGLE && depth != 0))682 { 683 if( drawMode & DRAW_POINTS)673 if( 1 /*drawMode & DRAW_MODEL || drawMode & DRAW_ALL*/) 674 { 675 if( depth == 0/*!(drawMode & DRAW_SINGLE && depth != 0)*/) 676 { 677 if( 1 /*drawMode & DRAW_POINTS*/) 684 678 { 685 679 glBegin(GL_POINTS); 680 glColor3f(0.3, 0.8, 0.54); 686 681 for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3) 687 682 glVertex3f(this->bvElement->modelInf->pVertices[i], … … 703 698 704 699 /* draw world axes */ 705 if( drawMode & DRAW_BV_AXIS)700 if( 1 /*drawMode & DRAW_BV_AXIS*/) 706 701 { 707 702 glBegin(GL_LINES); … … 721 716 722 717 723 if( drawMode & DRAW_BV_AXIS || drawMode & DRAW_ALL)724 { 725 if( drawMode & DRAW_SINGLE && depth != 0)718 if( 1/*drawMode & DRAW_BV_AXIS || drawMode & DRAW_ALL*/) 719 { 720 if( 1/*drawMode & DRAW_SINGLE && depth != 0*/) 726 721 { 727 722 /* draw the obb axes */ -
branches/cd/src/subprojects/collision_detection/collision_detection.cc
r7533 r7554 77 77 // mod = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN); 78 78 // CDEngine::getInstance()->debugSpawnTree(9, (sVec3D*)mod->getVertexArray(), mod->getVertexArrayCount()); 79 80 81 79 82 80 entityList = new tList<WorldEntity>(); … … 269 267 while( entity != NULL) 270 268 { 271 //if( likely(drawModel))269 if( likely(drawModel)) 272 270 entity->draw(); 273 271 entity->drawBVTree(depth, drawMode); -
branches/cd/src/subprojects/framework.cc
r7545 r7554 35 35 36 36 std::string dataPath = //Preferences::getInstance()->getString(CONFIG_SECTION_DATA, CONFIG_NAME_DATADIR, ""); 37 "/home/boenzlip/orxonox/data ";37 "/home/boenzlip/orxonox/data/trunk/"; 38 38 printf("%s\n", dataPath.c_str()); 39 39 if (!dataPath.empty())
Note: See TracChangeset
for help on using the changeset viewer.