Changeset 8316 in orxonox.OLD for trunk/src/lib/collision_detection
- Timestamp:
- Jun 11, 2006, 1:57:27 PM (19 years ago)
- Location:
- trunk/src/lib/collision_detection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/cd_engine.cc
r8186 r8316 99 99 if( likely( this->terrain != NULL)) 100 100 { 101 Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree();101 // Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree(); 102 102 // QuadtreeNode* n = q->getQuadtreeFromPosition(this->player->getAbsCoor()); 103 103 } 104 104 105 105 if( likely( this->bspManager != NULL)) 106 106 { -
trunk/src/lib/collision_detection/obb_tree.cc
r7711 r8316 74 74 /* triangles indexes created */ 75 75 int* triangleIndexes = new int[modelInf.numTriangles]; 76 for( int i = 0; i < modelInf.numTriangles; ++i)76 for(unsigned int i = 0; i < modelInf.numTriangles; ++i) 77 77 triangleIndexes[i] = i; 78 78 -
trunk/src/lib/collision_detection/obb_tree_node.cc
r8190 r8316 152 152 Vector p, q, r; //!< holder of the polygon data, much more conveniant to work with Vector than sVec3d 153 153 Vector t1, t2; //!< temporary values 154 float covariance[3][3] = {0,0,0, 0,0,0, 0,0,0};//!< the covariance matrix 155 const float* tmpVec = NULL; //!< a temp saving place for sVec3Ds 154 float covariance[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}};//!< the covariance matrix 156 155 157 156 /* fist compute all the convex hull face/facelets and centroids */ … … 275 274 PRINTF(4)("Calculate Box Axis\n"); 276 275 /* now get the axis length */ 277 float halfLength[3]; //!< half length of the axis278 276 float tmpLength; //!< tmp save point for the length 279 277 Plane p0(box.axis[0], box.center); //!< the axis planes … … 371 369 PRINTF(4)("Separating along the longest axis\n"); 372 370 /* get the closest vertex near the center */ 373 float dist = 999999.0f; //!< the smallest distance to each vertex374 371 float tmpDist; //!< variable to save diverse distances temporarily 375 int vertexIndex; //!< index of the vertex near the center376 372 Plane middlePlane(box.axis[longestAxisIndex], box.center); //!< the middle plane 377 const sVec3D* tmpVec; //!< temp simple 3D vector378 373 379 374 … … 662 657 glBegin(GL_POINTS); 663 658 glColor3f(0.3, 0.8, 0.54); 664 for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3)659 for(unsigned int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3) 665 660 glVertex3f(this->bvElement->modelInf->pVertices[i], 666 661 this->bvElement->modelInf->pVertices[i+1],
Note: See TracChangeset
for help on using the changeset viewer.