58 child.m_childShape = shape;
65 for (
int i = 0; i < 3; i++)
150 for (
int i = 0; i < 3; i++)
210 for (
k = 0;
k < n;
k++)
223 for (
k = 0;
k < n;
k++)
236 j =
t.getBasis() *
j;
245 j[0].setValue(
o2, 0, 0);
246 j[1].setValue(0,
o2, 0);
247 j[2].setValue(0, 0,
o2);
334 return "btCompoundShapeData";
#define btAlignedFree(ptr)
#define btAlignedAlloc(size, alignment)
@ COMPOUND_SHAPE_PROXYTYPE
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
const T & btMax(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
int size() const
return the number of elements in the array
void swap(int index0, int index1)
void push_back(const T &_Val)
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
virtual btScalar getMargin() const =0
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
virtual void setLocalScaling(const btVector3 &scaling)
btCompoundShape(bool enableDynamicAabbTree=true, const int initialChildCapacity=0)
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
void calculatePrincipalAxisTransform(const btScalar *masses, btTransform &principal, btVector3 &inertia) const
computes the exact moment of inertia and the transform from the coordinate system defined by the prin...
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
void createAabbTreeFromChildren()
void updateChildTransform(int childIndex, const btTransform &newChildTransform, bool shouldRecalculateLocalAabb=true)
set a new transform for a child, and update internal data structures (local aabb and dynamic tree)
virtual ~btCompoundShape()
btAlignedObjectArray< btCompoundShapeChild > m_children
virtual void removeChildShape(btCollisionShape *shape)
Remove all children shapes that contain the specified shape.
void removeChildShapeByIndex(int childShapeindex)
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...
void addChildShape(const btTransform &localTransform, btCollisionShape *shape)
btDbvt * m_dynamicAabbTree
virtual btScalar getMargin() const
virtual void recalculateLocalAabb()
Re-calculate the local Aabb.
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMatrix3x3 transpose() const
Return the transpose of the matrix.
btMatrix3x3 absolute() const
Return the matrix with all values non negative.
btVector3 can be used to represent 3D points and vectors.
btVector3 dot3(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
btScalar length2() const
Return the length of the vector squared.
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
struct btDbvtNode * m_node
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
static btDbvtAabbMm FromMM(const btVector3 &mi, const btVector3 &mx)
The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes ...
btDbvtNode * insert(const btDbvtVolume &box, void *data)
void update(btDbvtNode *leaf, int lookahead=-1)
void remove(btDbvtNode *leaf)