Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8316 in orxonox.OLD for trunk/src/lib/collision_detection


Ignore:
Timestamp:
Jun 11, 2006, 1:57:27 PM (19 years ago)
Author:
bensch
Message:

trunk: fixed most -Wall warnings… but there are still many missing :/

Location:
trunk/src/lib/collision_detection
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/cd_engine.cc

    r8186 r8316  
    9999  if( likely( this->terrain != NULL))
    100100  {
    101     Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree();
     101//    Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree();
    102102//    QuadtreeNode* n = q->getQuadtreeFromPosition(this->player->getAbsCoor());
    103103  }
    104  
     104
    105105  if( likely( this->bspManager != NULL))
    106106  {
  • trunk/src/lib/collision_detection/obb_tree.cc

    r7711 r8316  
    7474  /* triangles indexes created */
    7575  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)
    7777    triangleIndexes[i] = i;
    7878
  • trunk/src/lib/collision_detection/obb_tree_node.cc

    r8190 r8316  
    152152  Vector    p, q, r;                                 //!< holder of the polygon data, much more conveniant to work with Vector than sVec3d
    153153  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
    156155
    157156  /* fist compute all the convex hull face/facelets and centroids */
     
    275274  PRINTF(4)("Calculate Box Axis\n");
    276275  /* now get the axis length */
    277   float               halfLength[3];                         //!< half length of the axis
    278276  float               tmpLength;                             //!< tmp save point for the length
    279277  Plane               p0(box.axis[0], box.center);           //!< the axis planes
     
    371369  PRINTF(4)("Separating along the longest axis\n");
    372370  /* get the closest vertex near the center */
    373   float               dist = 999999.0f;                    //!< the smallest distance to each vertex
    374371  float               tmpDist;                             //!< variable to save diverse distances temporarily
    375   int                 vertexIndex;                         //!< index of the vertex near the center
    376372  Plane               middlePlane(box.axis[longestAxisIndex], box.center); //!< the middle plane
    377   const sVec3D*       tmpVec;                              //!< temp simple 3D vector
    378373
    379374
     
    662657        glBegin(GL_POINTS);
    663658        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)
    665660          glVertex3f(this->bvElement->modelInf->pVertices[i],
    666661                     this->bvElement->modelInf->pVertices[i+1],
Note: See TracChangeset for help on using the changeset viewer.