Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 9, 2006, 12:39:15 AM (18 years ago)
Author:
patrick
Message:

collision: some more debug work on the collision detection framework

File:
1 edited

Legend:

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

    r5882 r6447  
    2525
    2626  public:
    27     OBBTreeNode(const OBBTree& tree, unsigned int depth);
     27    OBBTreeNode(const OBBTree& tree, OBBTreeNode* prev, int depth);
    2828    virtual ~OBBTreeNode();
    2929
     
    3131    virtual inline const BoundingVolume* getBV() const { return (BoundingVolume*)this->bvElement; }
    3232
    33     virtual void spawnBVTree(const modelInfo& modelInf, const int* triangleIndexes, unsigned int length);
     33    virtual void spawnBVTree(const modelInfo& modelInf, const int* triangleIndexes, int length);
    3434
    3535    virtual void collideWith(const BVTreeNode& treeNode, const WorldEntity& nodeA, const WorldEntity& nodeB) const;
     
    3737    void debug() const;
    3838
     39    /**  gets the id of the current child @return id of the child */
     40    inline const int getID() { return this->nextID++; }
    3941
    4042  private:
    4143    void calculateBoxAxis(OBB& box, const sVec3D* verticesList, unsigned int length);
    4244
    43     void calculateBoxCovariance(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, unsigned int length);
    44     void calculateBoxEigenvectors(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, unsigned int length);
    45     void calculateBoxAxis(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, unsigned int length);
     45    void calculateBoxCovariance(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, int length);
     46    void calculateBoxEigenvectors(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, int length);
     47    void calculateBoxAxis(OBB& box, const modelInfo& modelInf, const int* triangleIndexes, int length);
    4648    void forkBox(OBB& box);
    4749
     
    5153  protected:
    5254    OBB*                bvElement;                  //!< the obb element
     55    OBBTreeNode*        nodePrev;                   //!< ref to the previous (parent) tree node = NULL if first
    5356    OBBTreeNode*        nodeLeft;                   //!< ref to the left tree node
    5457    OBBTreeNode*        nodeRight;                  //!< ref to the right tree node
     
    5659
    5760  private:
    58     unsigned int        treeIndex;                  //!< Index number of the BV in the tree
     61    int                 treeIndex;                  //!< Index number of the BV in the tree
     62    int                 nextID;                     //!< the id of the next child
    5963    int                 depth;                      //!< the depth of the node in the tree
    6064    const OBBTree*      obbTree;                    //!< reference to the obb tree
Note: See TracChangeset for help on using the changeset viewer.