Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 22, 2005, 1:11:06 PM (18 years ago)
Author:
patrick
Message:

collision_detection: interface change, const war continued

File:
1 edited

Legend:

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

    r5699 r5702  
    111111 * on the triangle informations (triangle soup not polygon soup)
    112112 */
    113 void OBBTreeNode::spawnBVTree(const int depth, const modelInfo& modInfo)
    114 {
    115   int length = 0;
     113void OBBTreeNode::spawnBVTree(const int depth, const modelInfo& modelInf,
     114                              const int* triangleIndexes, unsigned int length)
     115{
    116116  sVec3D* verticesList;
    117117
     
    123123
    124124  this->bvElement = new OBB();
    125   this->bvElement->vertices = verticesList;
    126   this->bvElement->numOfVertices = length;
     125 
     126  this->bvElement->modelInf = &modelInf;
     127  this->bvElement->triangleIndexes = triangleIndexes;
     128  this->bvElement->numTriangles = length;
     129 
    127130  PRINTF(3)("Created OBBox\n");
    128   this->calculateBoxCovariance(this->bvElement, modInfo);
     131  this->calculateBoxCovariance(this->bvElement, modelInf, triangleIndexes, length);
    129132  PRINTF(3)("Calculated attributes1\n");
    130   this->calculateBoxEigenvectors(this->bvElement, modInfo);
     133  this->calculateBoxEigenvectors(this->bvElement, modelInf, triangleIndexes, length);
    131134  PRINTF(3)("Calculated attributes2\n");
    132   this->calculateBoxAxis(this->bvElement,modInfo);
     135  this->calculateBoxAxis(this->bvElement, modelInf, triangleIndexes, length);
    133136  PRINTF(3)("Calculated attributes3\n");
    134137
     
    228231
    229232
    230 void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modInfo)
     233void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modInfo, const int* triangleIndexes, unsigned int length)
    231234{}
    232235
     
    421424
    422425
    423 void OBBTreeNode::calculateBoxEigenvectors(OBB* box, const modelInfo& modInfo)
     426void OBBTreeNode::calculateBoxEigenvectors(OBB* box, const modelInfo& modInfo,
     427                                           const int* triangleIndexes, unsigned int length)
    424428{}
    425429
     
    473477
    474478
    475 void OBBTreeNode::calculateBoxAxis(OBB* box, const modelInfo& modInfo)
     479void OBBTreeNode::calculateBoxAxis(OBB* box, const modelInfo& modInfo, const int* triangleIndexes, unsigned int length)
    476480{
    477481  this->calculateBoxAxis(box, (const sVec3D*)modInfo.pVertices, modInfo.numVertices);
Note: See TracChangeset for help on using the changeset viewer.