diff options
author | Stijn Buys <ingar@osirion.org> | 2011-05-06 16:32:55 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-05-06 16:32:55 +0000 |
commit | ebe064bf159a5c6e90f2bbe902efa16c6e654ff8 (patch) | |
tree | c15ac8d3a9c5a21ce09da1b6834ab7e9f98d9e10 /src/core/entity.h | |
parent | 1687737ca713cd0baeca3cf79950ef4877640c99 (diff) |
Always use a btCompoundShape for complex collision,
added infrastructure for collision mesh animation,
minor API documentation updates
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index a356525..230ce1b 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -167,8 +167,17 @@ public: } /// physics collision shape - inline CollisionShapes collision_shapes() { - return entity_collision_shapes; + inline btCollisionShape *collision_shape() { + return entity_collision_shape; + } + + /** + * @brief physics collision child shapes + * if the collision_shape is not a btcompoundShape, + * this set will be empty + **/ + inline CollisionShapes & collision_child_shapes() { + return entity_collision_child_shapes; } /// indicates a server-side entity @@ -196,11 +205,6 @@ public: return entity_menus; } - /// entity collision shapes - inline CollisionShapes & shapes() { - return entity_collision_shapes; - } - /// extensions inline Extension *extension(size_t type) const { return entity_extension[type]; @@ -453,7 +457,12 @@ public: protected: btRigidBody *entity_body; btRigidBody::btRigidBodyConstructionInfo *entity_body_info; - CollisionShapes entity_collision_shapes; + + // the main bullet collision shape for this entity + btCollisionShape *entity_collision_shape; + + // bullet collision child shapes for this entity, + CollisionShapes entity_collision_child_shapes; // the zone the entity belongs to Zone* entity_zone; |