Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

collision_detection: cleanup and recode of some small parts.

File:
1 edited

Legend:

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

    r5702 r5703  
    3333using namespace std;
    3434
    35 OBBTree*  OBBTreeNode::obbTree = NULL;
    36 
    3735float**  OBBTreeNode::coMat = NULL;
    3836float**  OBBTreeNode::eigvMat = NULL;
     
    4442 *  standard constructor
    4543 */
    46 OBBTreeNode::OBBTreeNode ()
     44OBBTreeNode::OBBTreeNode (const OBBTree* tree)
     45  : BVTreeNode()
    4746{
    4847  this->setClassID(CL_OBB_TREE_NODE, "OBBTreeNode");
     48  this->obbTree = tree;
    4949  this->nodeLeft = NULL;
    5050  this->nodeRight = NULL;
     
    117117
    118118  PRINT(3)("\n");
    119   this->treeIndex = this->obbTree->getID();
    120119  PRINTF(3)("OBB Depth: %i, tree index: %i, numVertices: %i\n", depth, treeIndex, length);
    121120  this->depth = depth;
     
    181180{
    182181  PRINT(3)("\n");
    183   this->treeIndex = this->obbTree->getID();
    184182  PRINTF(3)("OBB Depth: %i, tree index: %i, numVertices: %i\n", depth, treeIndex, length);
    185183  this->depth = depth;
     
    208206    if(this->tmpLen1 > 2)
    209207    {
    210       OBBTreeNode* node1 = new OBBTreeNode();
     208      OBBTreeNode* node1 = new OBBTreeNode(this->obbTree);
    211209      this->nodeLeft = node1;
    212210      this->nodeLeft->spawnBVTree(depth - 1, this->tmpVert1, this->tmpLen1);
     
    219217    if( this->tmpLen2 > 2)
    220218    {
    221       OBBTreeNode* node2 = new OBBTreeNode();
     219      OBBTreeNode* node2 = new OBBTreeNode(this->obbTree);
    222220      this->nodeRight = node2;
    223221      this->nodeRight->spawnBVTree(depth - 1, this->tmpVert2, this->tmpLen2);
Note: See TracChangeset for help on using the changeset viewer.