Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
| /// The btCompoundShape allows to store multiple other btCollisionShapes | /// The btCompoundShape allows to store multiple other btCollisionShapes | ||||
| /// This allows for moving concave collision objects. This is more general then the static concave btBvhTriangleMeshShape. | /// This allows for moving concave collision objects. This is more general then the static concave btBvhTriangleMeshShape. | ||||
| /// It has an (optional) dynamic aabb tree to accelerate early rejection tests. | /// It has an (optional) dynamic aabb tree to accelerate early rejection tests. | ||||
| /// @todo: This aabb tree can also be use to speed up ray tests on btCompoundShape, see http://code.google.com/p/bullet/issues/detail?id=25 | /// @todo: This aabb tree can also be use to speed up ray tests on btCompoundShape, see http://code.google.com/p/bullet/issues/detail?id=25 | ||||
| /// Currently, removal of child shapes is only supported when disabling the aabb tree (pass 'false' in the constructor of btCompoundShape) | /// Currently, removal of child shapes is only supported when disabling the aabb tree (pass 'false' in the constructor of btCompoundShape) | ||||
| ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape | ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape | ||||
| { | { | ||||
| protected: | |||||
| btAlignedObjectArray<btCompoundShapeChild> m_children; | btAlignedObjectArray<btCompoundShapeChild> m_children; | ||||
| btVector3 m_localAabbMin; | btVector3 m_localAabbMin; | ||||
| btVector3 m_localAabbMax; | btVector3 m_localAabbMax; | ||||
| btDbvt* m_dynamicAabbTree; | btDbvt* m_dynamicAabbTree; | ||||
| ///increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated | ///increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated | ||||
| int m_updateRevision; | int m_updateRevision; | ||||
| btScalar m_collisionMargin; | btScalar m_collisionMargin; | ||||
| protected: | |||||
| btVector3 m_localScaling; | btVector3 m_localScaling; | ||||
| public: | public: | ||||
| BT_DECLARE_ALIGNED_ALLOCATOR(); | BT_DECLARE_ALIGNED_ALLOCATOR(); | ||||
| btCompoundShape(bool enableDynamicAabbTree = true); | explicit btCompoundShape(bool enableDynamicAabbTree = true, const int initialChildCapacity = 0); | ||||
| virtual ~btCompoundShape(); | virtual ~btCompoundShape(); | ||||
| void addChildShape(const btTransform& localTransform,btCollisionShape* shape); | void addChildShape(const btTransform& localTransform,btCollisionShape* shape); | ||||
| /// Remove all children shapes that contain the specified shape | /// Remove all children shapes that contain the specified shape | ||||
| virtual void removeChildShape(btCollisionShape* shape); | virtual void removeChildShape(btCollisionShape* shape); | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||