Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5710 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 22, 2005, 5:38:45 PM (19 years ago)
Author:
patrick
Message:

collision_detection: start switching to triangles instead of vertex soup

File:
1 edited

Legend:

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

    r5706 r5710  
    218218
    219219
    220 void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modInfo,
     220void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modelInf,
    221221                                         const int* triangleIndexes, unsigned int length)
    222222{
     
    232232  Vector    t1, t2;                                  //!< temporary values
    233233  float     covariance[3][3] = {0,0,0, 0,0,0, 0,0,0};//!< the covariance matrix
     234  sVec3D*   tmpVec = NULL;                           //!< a temp saving place for sVec3Ds
    234235
    235236
    236237 
    237238  /* fist compute all the convex hull face/facelets and centroids */
    238   for( int i = 0; i+3 < length ; i+=3)          /* FIX-ME-QUICK: hops of 3, array indiscontinuity*/
    239   {
    240     p = verticesList[i];
    241     q = verticesList[i + 1];
    242     r = verticesList[i + 2];
     239  for( int i = 0; i < length ; ++i)
     240  {
     241    sVec3D* a = (sVec3D*)(&modelInf.pVertices[modelInf.pTriangles[i].indexToVertices[0]]);
     242    p = *a;
     243    p.debug();
     244    //q = modelInf.pVertices[modelInf.pTriangles[i][1]];     //verticesList[i + 1];
     245    //r = modelInf.pVertices[modelInf.pTriangles[i][2]];     //verticesList[i + 2];
    243246
    244247    t1 = p - q; t2 = p - r;
Note: See TracChangeset for help on using the changeset viewer.