Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 19, 2005, 9:10:16 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: extended the constructor interface to force the specification of a parent Node

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc

    r4889 r4896  
    2828*/
    2929QuadtreeNode::QuadtreeNode (sTriangleExt** triangles, int numTriangles,
    30                             const float* pVertices, int numVertices, Quadtree* quadtree)
     30                            const float* pVertices, int numVertices,
     31                            Quadtree* quadtree, QuadtreeNode* parent)
    3132{
    3233  this->pTriangles = triangles;
     
    3637  this->quadtree = quadtree;
    3738  this->treeDepth = 0;
    38 
    39 //   this->pDimension = this->getDimension();
     39  this->parent = parent;
     40
    4041  this->init();
    4142}
     
    5859  this->treeDepth = 0;
    5960
    60 //   this->pDimension = this->getDimension(this->pModelInfo);
    6161  this->init();
    6262}
     
    7171
    7272  this->offset = 0.0f;
     73  this->parent = NULL;
    7374  this->nodeA = NULL;
    7475  this->nodeB = NULL;
     
    245246
    246247  /* now propagate */
    247   this->nodeA = new QuadtreeNode(pTriA, lenA, this->pVertices, this->numVertices, this->quadtree);
    248   this->nodeB = new QuadtreeNode(pTriB, lenB, this->pVertices, this->numVertices, this->quadtree);
    249   this->nodeC = new QuadtreeNode(pTriC, lenC, this->pVertices, this->numVertices, this->quadtree);
    250   this->nodeD = new QuadtreeNode(pTriD, lenD, this->pVertices, this->numVertices, this->quadtree);
     248  this->nodeA = new QuadtreeNode(pTriA, lenA, this->pVertices, this->numVertices, this->quadtree, this);
     249  this->nodeB = new QuadtreeNode(pTriB, lenB, this->pVertices, this->numVertices, this->quadtree, this);
     250  this->nodeC = new QuadtreeNode(pTriC, lenC, this->pVertices, this->numVertices, this->quadtree, this);
     251  this->nodeD = new QuadtreeNode(pTriD, lenD, this->pVertices, this->numVertices, this->quadtree, this);
    251252}
    252253
Note: See TracChangeset for help on using the changeset viewer.