Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 31, 2006, 2:41:28 PM (18 years ago)
Author:
patrick
Message:

cdmerge: merged with the newest trunk an corrected some segfaults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cdmerge/src/lib/collision_detection/obb_tree.h

    r6022 r6894  
    1717
    1818//! A class for representing an obb tree
    19 class OBBTree : public BVTree {
     19class OBBTree : public BVTree
     20{
    2021
    2122  public:
    22     OBBTree();
    23     OBBTree(int depth, sVec3D *verticesList, const int length);
    24     OBBTree(int depth, const modelInfo& modInfo);
     23    OBBTree(int depth, const modelInfo* modInfo);
    2524    virtual ~OBBTree();
    2625    void init();
    2726
    28     virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length);
    29     virtual void spawnBVTree(int depth, const modelInfo& modInfo);
     27    virtual void spawnBVTree(const modelInfo& modelInf);
    3028    virtual void flushTree();
    3129
    32     virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB);
    33     virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2);
    34 
     30    virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) const;
    3531    virtual void drawBV(int depth, int drawMode) const;
    3632
    37     int getID() { return ++this->id;}
    38     inline OBBTreeNode* getRootNode() { return this->rootNode; }
     33    /** returns the next if for the obb tree node @return integer id number of the next node */
     34    inline const int getID() { return ++this->id;}
     35    /** returns the root node of the bounding volume tree @return reference to the root node */
     36    inline const OBBTreeNode* getRootNode() const { return this->rootNode; }
    3937
    4038    void debug();
     
    4240  private:
    4341    OBBTreeNode*         rootNode;                        //!< reference to the root node of the tree
    44     int                  id;
     42    int                  id;                              //!< the next id of a obb tree node
     43    int                  depth;                           //!< the depth of the tree to generate
    4544};
    4645
Note: See TracChangeset for help on using the changeset viewer.