Changeset 9896 in orxonox.OLD for branches/coll_rect/src/world_entities/world_entity.h
- Timestamp:
- Oct 20, 2006, 1:09:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/coll_rect/src/world_entities/world_entity.h
r9892 r9896 12 12 13 13 #include "cr_engine.h" 14 #include "collision_filter.h" 14 15 #include "object_manager.h" 15 16 #include "glincl.h" … … 25 26 namespace OrxSound { class SoundBuffer; class SoundSource; } 26 27 namespace OrxGui { class GLGuiWidget; class GLGuiBar; class GLGuiEnergyWidget; }; 27 namespace CoRe { class Collision Handle; class Collision; }28 namespace CoRe { class Collision; } 28 29 29 30 class BVTree; … … 76 77 inline AABB* getModelAABB() const { return (this->aabbNode)?this->aabbNode->getAABB():NULL;} 77 78 79 virtual void hit(float damage, WorldEntity* killer); 80 78 81 79 82 /* --- Collision Reaction Block --- */ 80 void subscribeReaction(CoRe::CREngine::ReactionType type);81 83 void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1); 82 84 void subscribeReaction(CoRe::CREngine::ReactionType type, const ClassID& target1, const ClassID& target2); … … 84 86 85 87 void unsubscribeReaction(CoRe::CREngine::ReactionType type); 86 void unsubscribeReaction(); 87 88 bool registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB); 89 bool registerCollision(int type, WorldEntity* entity, WorldEntity* groundEntity, Vector normal, Vector position, bool bInWall = false); 88 void unsubscribeReactions(); 89 90 90 /** @return true if there is at least on collision reaction subscribed */ 91 91 inline bool isReactive() const { return this->bReactive; } 92 92 93 CoRe::CollisionHandle* getCollisionHandle(CoRe::CREngine::ReactionType type) const { return this->collisionHandles[type]; }93 const CoRe::CollisionFilter& getCollisionFilter(CoRe::CREngine::ReactionType type) const { return this->collisionFilter; } 94 94 95 95 /** @returns true if this entity is standing on ground (BSP model) */ … … 97 97 /** @param flag: marks if this entity is standing on ground */ 98 98 void setOnGround(bool flag) { this->bOnGround = flag; } 99 100 virtual void hit(float damage, WorldEntity* killer);101 99 102 100 virtual void destroy( WorldEntity* killer ); … … 193 191 194 192 /* collision reaction stuff */ 195 CoRe::Collision Handle* collisionHandles[CoRe::CREngine::CR_NUMBER]; //!< the list of the collision reactions196 bool bReactive; 193 CoRe::CollisionFilter collisionFilter; //!< filter for collision event filtering (not every entity listens to all collisions) 194 bool bReactive; //!< true if there is at least one collision reaction subscibed 197 195 198 196
Note: See TracChangeset
for help on using the changeset viewer.