Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7711 in orxonox.OLD for trunk/src/lib/collision_detection/obb_tree.h


Ignore:
Timestamp:
May 18, 2006, 11:44:21 PM (18 years ago)
Author:
patrick
Message:

trunk: merged the cd branche back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/obb_tree.h

    r6022 r7711  
    1515class OBBTreeNode;
    1616class PNode;
     17class WorldEntity;
    1718
    1819//! A class for representing an obb tree
    19 class OBBTree : public BVTree {
     20class OBBTree : public BVTree
     21{
    2022
    2123  public:
    22     OBBTree();
    23     OBBTree(int depth, sVec3D *verticesList, const int length);
    24     OBBTree(int depth, const modelInfo& modInfo);
     24    OBBTree(int depth, const modelInfo* modInfo, WorldEntity* entity);
    2525    virtual ~OBBTree();
    2626    void init();
    2727
    28     virtual void spawnBVTree(int depth, sVec3D *verticesList, const int length);
    29     virtual void spawnBVTree(int depth, const modelInfo& modInfo);
     28    virtual void spawnBVTree(const modelInfo& modelInf);
    3029    virtual void flushTree();
    3130
    32     virtual void collideWith(BVTree* tree, WorldEntity* nodeA, WorldEntity* nodeB);
    3331    virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2);
    34 
    3532    virtual void drawBV(int depth, int drawMode) const;
    3633
    37     int getID() { return ++this->id;}
    38     inline OBBTreeNode* getRootNode() { return this->rootNode; }
     34    /** returns the next if for the obb tree node @return integer id number of the next node */
     35    inline const int getID() { return ++this->id;}
     36    /** returns the root node of the bounding volume tree @return reference to the root node */
     37    inline OBBTreeNode* getRootNode() const { return this->rootNode; }
     38    inline WorldEntity* getOwner() const { return this->owner; }
    3939
    4040    void debug();
     
    4242  private:
    4343    OBBTreeNode*         rootNode;                        //!< reference to the root node of the tree
    44     int                  id;
     44    int                  id;                              //!< the next id of a obb tree node
     45    int                  depth;                           //!< the depth of the tree to generate
     46    WorldEntity*         owner;                           //!< owner
    4547};
    4648
Note: See TracChangeset for help on using the changeset viewer.