Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/collision_detection/src/lib/collision_detection/obb_tree.h @ 5922

Last change on this file since 5922 was 5882, checked in by patrick, 19 years ago

collision_detection: very much work on the cd engine, now the obbs do assemble again, but not yet correctly. Much more debug work to come..

File size: 1.2 KB
RevLine 
[4616]1/*!
[5039]2 * @file obb_tree.h
[4836]3  *  Definition of an obb tree (object oriented Bounding Box)
[4510]4
5*/
6
[4511]7#ifndef _OBB_TREE_H
8#define _OBB_TREE_H
[4510]9
[4514]10#include "bv_tree.h"
[4551]11#include "abstract_model.h"
[4616]12#include "material.h"
[4510]13
[4616]14class Material;
[4550]15class OBBTreeNode;
[4700]16class PNode;
[4550]17
[4511]18//! A class for representing an obb tree
[5882]19class OBBTree : public BVTree
20{
[4510]21
[4616]22  public:
[5684]23    OBBTree(int depth, const modelInfo& modInfo);
[4616]24    virtual ~OBBTree();
[4682]25    void init();
[4510]26
[5716]27    virtual void spawnBVTree(const modelInfo& modelInf);
[4616]28    virtual void flushTree();
[4510]29
[5718]30    virtual void collideWith(const WorldEntity& entity1, const WorldEntity& entity2) const;
[4635]31    virtual void drawBV(int depth, int drawMode) const;
[4528]32
[5882]33    /** returns the next if for the obb tree node @return integer id number of the next node */
[5717]34    const int getID() { return ++this->id;}
[5882]35    /** returns the root node of the bounding volume tree @return reference to the root node */
[5717]36    inline const OBBTreeNode* getRootNode() const { return this->rootNode; }
[4622]37
[4616]38    void debug();
[4546]39
[4616]40  private:
41    OBBTreeNode*         rootNode;                        //!< reference to the root node of the tree
[4638]42    int                  id;
[5716]43    int                  depth;                           //!< the depth of the tree to generate
[4510]44};
45
[4511]46#endif /* _OBB_TREE_H */
Note: See TracBrowser for help on using the repository browser.