vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NoPartitioning_Scene.h
Go to the documentation of this file.
1 #ifndef NOPARTITIONING_SCENE
2 #define NOPARTITIONING_SCENE
3 
5 #include <vrecko/Ability.h>
6 #include <vrecko/Scene.h>
7 #include <vrecko/Timer.h>
8 
10 
11 using namespace vrecko;
12 
13 namespace APSpacePartitioning {
14 
15 
16 #define SP_SCENE_INTERFACE_ID__NOPARTITIONING 1
17 
27 public:
30 
31  virtual void preInitialize(void);
32  virtual void update();
33  virtual bool performCompleteTest(CollisionParams * params, COLLISIONS_INFO_VECTOR ** collisions, unsigned long limitToEO1, unsigned long limitToEO2);
34  virtual bool performUpdate(CollisionParams * params, COLLISIONS_INFO_VECTOR ** collisions, unsigned long limitToEO1, unsigned long limitToEO2);
36 protected:
37 
42  long objectID;
43  int voxelSize;
46  osg::Vec3f position;
47  float timeDivision;
48  };
49 
55  long objectID;
59  osg::Vec3f position;
60  list<CollisionStructObject> collisionObjects;
61  };
62 
63  CollisionStruct collisionField[20];
64  __int64 ctrTimeLast, ctrTimeNew, computeTimeLast,computeTimeNew, freq;
74  virtual bool findCollisionsWithObject(CollisionParams * params, COLLISIONS_INFO_VECTOR ** collisions, unsigned long testedObject, unsigned long limitToEO2, float time, vrecko::Scene::EOIteratorHelper *iterator = NULL);
75  virtual bool singleCollisionTest(CollisionParams * params, COLLISIONS_INFO_VECTOR ** collisions, unsigned long obj1ID, unsigned long obj2ID, float time);
76  virtual void fillCollisionLists(CollisionParams * params);
77  virtual inline bool isIntersection(osg::Vec3f pos1, osg::Vec3f pos2, float radius1, float radius2);
78  virtual inline void updateBoundingBox(osg::Node *pNode);
80  LARGE_INTEGER detectiontime1, detectiontime2, looptime1, looptime2, fr;
83 };
84 
85 }
86 
87 
88 
89 #endif
90