16 #ifndef BT_COMPOUND_SHAPE_H
17 #define BT_COMPOUND_SHAPE_H
77 void addChildShape(
const btTransform& localTransform,btCollisionShape* shape);
80 virtual void removeChildShape(btCollisionShape* shape);
82 void removeChildShapeByIndex(
int childShapeindex);
87 return int (m_children.
size());
92 return m_children[index].m_childShape;
96 return m_children[index].m_childShape;
101 return m_children[index].m_transform;
105 return m_children[index].m_transform;
109 void updateChildTransform(
int childIndex,
const btTransform& newChildTransform,
bool shouldRecalculateLocalAabb =
true);
114 return &m_children[0];
122 virtual void recalculateLocalAabb();
124 virtual void setLocalScaling(
const btVector3& scaling);
128 return m_localScaling;
135 m_collisionMargin = margin;
139 return m_collisionMargin;
148 return m_dynamicAabbTree;
153 return m_dynamicAabbTree;
156 void createAabbTreeFromChildren();
167 return m_updateRevision;
170 virtual int calculateSerializeBufferSize()
const;
173 virtual const char* serialize(
void* dataBuffer,
btSerializer* serializer)
const;
212 #endif //BT_COMPOUND_SHAPE_H
virtual btScalar getMargin() const
btCompoundShapeChildData * m_childShapePtr
virtual const btVector3 & getLocalScaling() const
virtual int calculateSerializeBufferSize() const
btDbvt * m_dynamicAabbTree
btAlignedObjectArray< btCompoundShapeChild > m_children
int getUpdateRevision() const
The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes ...
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
#define SIMD_FORCE_INLINE
const btCollisionShape * getChildShape(int index) const
btCollisionShape * m_childShape
virtual void setMargin(btScalar margin)
const btDbvt * getDynamicAabbTree() const
btCollisionShapeData m_collisionShapeData
struct btDbvtNode * m_node
int m_updateRevision
increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be up...
btDbvt * getDynamicAabbTree()
int size() const
return the number of elements in the array
const btTransform & getChildTransform(int index) const
bool operator==(const btCompoundShapeChild &c1, const btCompoundShapeChild &c2)
btTransform & getChildTransform(int index)
virtual const char * getName() const
btTransformFloatData m_transform
btScalar m_collisionMargin
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
btCompoundShapeChild * getChildList()
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
#define BT_DECLARE_ALIGNED_ALLOCATOR()
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
btCollisionShapeData * m_childShape
btCollisionShape * getChildShape(int index)
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
int getNumChildShapes() const