16#ifndef BT_COMPOUND_SHAPE_H
17#define BT_COMPOUND_SHAPE_H
75 explicit btCompoundShape(
bool enableDynamicAabbTree =
true,
const int initialChildCapacity = 0);
84 void removeChildShapeByIndex(
int childShapeindex);
88 return int(m_children.
size());
93 return m_children[index].m_childShape;
97 return m_children[index].m_childShape;
102 return m_children[index].m_transform;
106 return m_children[index].m_transform;
110 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;
bool operator==(const btCompoundShapeChild &c1, const btCompoundShapeChild &c2)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
#define SIMD_FORCE_INLINE
int size() const
return the number of elements in the array
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
BT_DECLARE_ALIGNED_ALLOCATOR()
btCollisionShape * getChildShape(int index)
const btTransform & getChildTransform(int index) const
btAlignedObjectArray< btCompoundShapeChild > m_children
btTransform & getChildTransform(int index)
btScalar m_collisionMargin
int m_updateRevision
increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be up...
btDbvt * m_dynamicAabbTree
virtual const btVector3 & getLocalScaling() const
virtual const char * getName() const
const btCollisionShape * getChildShape(int index) const
virtual int calculateSerializeBufferSize() const
virtual btScalar getMargin() const
int getUpdateRevision() const
const btDbvt * getDynamicAabbTree() const
virtual void setMargin(btScalar margin)
int getNumChildShapes() const
btCompoundShapeChild * getChildList()
btDbvt * getDynamicAabbTree()
btVector3 can be used to represent 3D points and vectors.
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btTransformFloatData m_transform
btCollisionShapeData * m_childShape
struct btDbvtNode * m_node
btCollisionShape * m_childShape
BT_DECLARE_ALIGNED_ALLOCATOR()
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btCompoundShapeChildData * m_childShapePtr
btCollisionShapeData m_collisionShapeData
The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes ...