Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4522 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Jun 6, 2005, 11:43:06 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: started implementing header file of cd, some cd state infos

Location:
orxonox/trunk/src/util/collision_detection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/collision_detection/bounding_volume.h

    r4521 r4522  
    2727  virtual void mergeWith(const BoundingVolume& bv) = NULL;
    2828
    29   virtual void drawBV(int currentDepth, int depth) = NULL;
     29  virtual void drawBV(int currentDepth, int depth) const = NULL;
    3030  virtual void drawBVPolygon(int currentDepth, int depth) const = NULL;
    3131  virtual void drawBVBlended(int currentDepth, int depth) const = NULL;
  • orxonox/trunk/src/util/collision_detection/cd_engine.h

    r4519 r4522  
    99
    1010#include "base_object.h"
     11#include "collision_defs.h"
     12
     13
     14//! the state options
     15typedef enum cdState
     16  {
     17    CD_DEBUG_DRAW_ALL = 1,
     18    CD_DEBUG_DRAW_POLYGONS = 1<<1,
     19    CD_DEBUG_DRAW_BLENDED = 1<<2,
     20    CD_DEBUG_DRAW_HIT_BV = 1<<3,
     21    CD_DEBUG_VERBOSE = 1<<4
     22  };
    1123
    1224
     
    1830  /** \returns a Pointer to the only object of this Class */
    1931  inline static CDEngine* getInstance(void) { if (!singletonRef) singletonRef = new CDEngine();  return singletonRef; };
     32  void init();
     33
     34  void setState(int newState);
     35  const int getState() const { return this->state; }
     36
     37  void drawBV(int currentDepth, int depth) const;
     38  void drawBVPolygon(int currentDepth, int depth) const;
     39  void drawBVBlended(int currentDepth, int depth) const;
     40
     41  void checkCollisions();
    2042
    2143 private:
    2244  CDEngine(void);
    2345  static CDEngine* singletonRef;
     46
     47  void buildBVTree(int depth = MAX_BV_TREE_DEPTH);
     48
     49
     50 private:
     51  int         state;                            //!< the current state of the cd engine
     52
    2453};
    2554
Note: See TracChangeset for help on using the changeset viewer.