Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7545 in orxonox.OLD for branches/cd/src/lib/collision_detection


Ignore:
Timestamp:
May 6, 2006, 1:36:22 AM (19 years ago)
Author:
patrick
Message:

cd: work on the obb creation algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cd/src/lib/collision_detection/obb_tree_node.cc

    r7537 r7545  
    174174    t1 = p - q;
    175175    t2 = p - r;
    176     facelet[i] = 0.5f * fabs( t1.cross(t2).len() );
     176    facelet[i] = 0.5f * /*fabs*/( t1.cross(t2).len() );
    177177    /* update the entire convex hull surface */
    178178    face += facelet[i];
     
    222222  bool                       vertexFound;                               //!< vertex found flag
    223223  Vector                     arithCenter;                               //!< aritmetical center
    224 
    225   /* calculate the arithmetical center of the box */
    226 
    227   /* go thourgh all vertices, add only the used vertices indexes */
    228 //   for( int i = 0; i < length; ++i)
    229 //   {
    230 //     for(int j = 0; j < 3; ++j)
    231 //     {
    232 //       vertIndex = modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j];
    233 //
    234 //       vertexFound = false;
    235 //       for( int i = 0; i < vertIndexVector.size(); i++)
    236 //       {
    237 //         if( vertIndexVector[i] == vertIndex)
    238 //           vertexFound = true;
    239 //       }
    240 //       if( !vertexFound)
    241 //         vertIndexVector.push_back(vertIndex);
    242 //     }
    243 //   }
    244 //   /* now realy calculate the center */
    245 //   for( int i = 0; i < vertIndexVector.size(); ++i)
    246 //   {
    247 //     tmpVec = (sVec3D*)(&modelInf.pVertices[vertIndexVector[i]]);
    248 //     arithCenter += *tmpVec;
    249 //   }
    250 //   box.arithCenter = arithCenter / vertIndexVector.size();
    251 
    252224
    253225
Note: See TracChangeset for help on using the changeset viewer.