Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4631 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Jun 14, 2005, 5:28:21 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: the damn segfault is nomore, patrick is on killing spree

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r4630 r4631  
    102102  this->bvElement = new OBB();
    103103  PRINTF(0)("Created OBBox\n");
    104   this->calculateBoxAttributes(this->bvElement, verticesList, length);
    105   PRINTF(0)("Calculated attributes\n");
     104  this->calculateBoxAttributes1(this->bvElement, verticesList, length);
     105  PRINTF(0)("Calculated attributes1\n");
     106  this->calculateBoxAttributes2(this->bvElement, verticesList, length);
     107  PRINTF(0)("Calculated attributes2\n");
     108  this->calculateBoxAttributes3(this->bvElement, verticesList, length);
     109  PRINTF(0)("Calculated attributes3\n");
    106110
    107111  if( likely( this->depth > 0))
     
    123127
    124128
    125 void OBBTreeNode::calculateBoxAttributes(OBB* box, sVec3D* verticesList, int length)
     129void OBBTreeNode::calculateBoxAttributes1(OBB* box, sVec3D* verticesList, int length)
    126130{
    127131  float     facelet[length];                         //!< surface area of the i'th triangle of the convex hull
     
    180184  }
    181185  PRINTF(0)("-- Calculated Covariance\n");
     186  return;
    182187
    183188//   printf("\nVertex Data:\n");
     
    209214  *box->center = center;
    210215  PRINTF(0)("-- Written Result to obb\n");
     216}
     217
     218
     219
     220void OBBTreeNode::calculateBoxAttributes2(OBB* box, sVec3D* verticesList, int length)
     221{
    211222
    212223  /* now getting spanning vectors of the sub-space:
     
    226237  //eigvMat[0] = new float[4]; eigvMat[1] = new float[4]; eigvMat[2] = new float[4]; eigvMat[3] = new float[4];
    227238
    228   coMat[1][1] = covariance[0][0]; coMat[1][2] = covariance[0][1]; coMat[1][3] = covariance[0][2];
    229   coMat[2][1] = covariance[1][0]; coMat[2][2] = covariance[1][1]; coMat[2][3] = covariance[1][2];
    230   coMat[3][1] = covariance[2][0]; coMat[3][2] = covariance[2][1]; coMat[3][3] = covariance[2][2];
     239  coMat[1][1] = box->covarianceMatrix[0][0]; coMat[1][2] = box->covarianceMatrix[0][1]; coMat[1][3] = box->covarianceMatrix[0][2];
     240  coMat[2][1] = box->covarianceMatrix[1][0]; coMat[2][2] = box->covarianceMatrix[1][1]; coMat[2][3] = box->covarianceMatrix[1][2];
     241  coMat[3][1] = box->covarianceMatrix[2][0]; coMat[3][2] = box->covarianceMatrix[2][1]; coMat[3][3] = box->covarianceMatrix[2][2];
    231242
    232243  /* new jacobi tests */
     
    265276//
    266277//   delete rot;
    267 
     278}
     279
     280void OBBTreeNode::calculateBoxAttributes3(OBB* box, sVec3D* verticesList, int length)
     281{
    268282
    269283  /* now get the axis length */
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.h

    r4630 r4631  
    4141
    4242  private:
    43     void calculateBoxAttributes(OBB* box, sVec3D* verticesList, int length);
     43    void calculateBoxAttributes1(OBB* box, sVec3D* verticesList, int length);
     44    void calculateBoxAttributes2(OBB* box, sVec3D* verticesList, int length);
     45    void calculateBoxAttributes3(OBB* box, sVec3D* verticesList, int length);
    4446    void forkBox(OBB* box);
    4547
  • orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc

    r4630 r4631  
    4747//   }
    4848
    49   CDEngine::getInstance()->debugSpawnTree(1, model->data->pVertices, model->data->numVertices);
     49  CDEngine::getInstance()->debugSpawnTree(4, model->data->pVertices, model->data->numVertices);
    5050
    5151
     
    8282void Framework::moduleDraw() const
    8383{
    84   CDEngine::getInstance()->drawBV(1);
     84  CDEngine::getInstance()->drawBV(3);
    8585
    8686  LightManager::getInstance()->draw();
Note: See TracChangeset for help on using the changeset viewer.