|
Bullet Collision Detection & Physics Library
|
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave collision objects. More...
#include <btCompoundShape.h>


Protected Attributes | |
| btAlignedObjectArray< btCompoundShapeChild > | m_children |
| btVector3 | m_localAabbMin |
| btVector3 | m_localAabbMax |
| btDbvt * | m_dynamicAabbTree |
| int | m_updateRevision |
| increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated | |
| btScalar | m_collisionMargin |
| btVector3 | m_localScaling |
Protected Attributes inherited from btCollisionShape | |
| int | m_shapeType |
| void * | m_userPointer |
| int | m_userIndex |
The btCompoundShape allows to store multiple other btCollisionShapes 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.
Definition at line 54 of file btCompoundShape.h.
|
explicit |
Definition at line 21 of file btCompoundShape.cpp.
|
virtual |
Definition at line 42 of file btCompoundShape.cpp.
| void btCompoundShape::addChildShape | ( | const btTransform & | localTransform, |
| btCollisionShape * | shape ) |
Definition at line 51 of file btCompoundShape.cpp.
| btCompoundShape::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
Implements btCollisionShape.
Definition at line 193 of file btCompoundShape.cpp.
| void btCompoundShape::calculatePrincipalAxisTransform | ( | btScalar * | masses, |
| btTransform & | principal, | ||
| btVector3 & | inertia ) const |
computes the exact moment of inertia and the transform from the coordinate system defined by the principal axes of the moment of inertia and the center of mass to the current coordinate system.
"masses" points to an array of masses of the children. The resulting transform "principal" has to be applied inversely to all children transforms in order for the local coordinate system of the compound shape to be centered at the center of mass and to coincide with the principal axes. This also necessitates a correction of the world transform of the collision object by the principal transform.
Definition at line 216 of file btCompoundShape.cpp.
|
inlinevirtual |
Reimplemented from btCollisionShape.
Definition at line 201 of file btCompoundShape.h.
| void btCompoundShape::createAabbTreeFromChildren | ( | ) |
Definition at line 300 of file btCompoundShape.cpp.
|
virtual |
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
Implements btCollisionShape.
Definition at line 169 of file btCompoundShape.cpp.
|
inline |
Definition at line 112 of file btCompoundShape.h.
|
inline |
Definition at line 90 of file btCompoundShape.h.
|
inline |
Definition at line 94 of file btCompoundShape.h.
|
inline |
Definition at line 99 of file btCompoundShape.h.
|
inline |
Definition at line 103 of file btCompoundShape.h.
|
inline |
Definition at line 151 of file btCompoundShape.h.
Definition at line 146 of file btCompoundShape.h.
Implements btCollisionShape.
Definition at line 126 of file btCompoundShape.h.
Implements btCollisionShape.
Definition at line 137 of file btCompoundShape.h.
Implements btCollisionShape.
Definition at line 141 of file btCompoundShape.h.
|
inline |
Definition at line 85 of file btCompoundShape.h.
|
inline |
Definition at line 165 of file btCompoundShape.h.
|
virtual |
Re-calculate the local Aabb.
Is called at the end of removeChildShapes. Use this yourself if you modify the children or their transforms.
Definition at line 145 of file btCompoundShape.cpp.
|
virtual |
Remove all children shapes that contain the specified shape.
Definition at line 127 of file btCompoundShape.cpp.
Definition at line 110 of file btCompoundShape.cpp.
|
virtual |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented from btCollisionShape.
Definition at line 325 of file btCompoundShape.cpp.
Implements btCollisionShape.
Definition at line 280 of file btCompoundShape.cpp.
Implements btCollisionShape.
Definition at line 133 of file btCompoundShape.h.
| void btCompoundShape::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)
update the dynamic aabb tree
Definition at line 90 of file btCompoundShape.cpp.
|
protected |
Definition at line 57 of file btCompoundShape.h.
|
protected |
Definition at line 66 of file btCompoundShape.h.
|
protected |
Definition at line 61 of file btCompoundShape.h.
|
protected |
Definition at line 59 of file btCompoundShape.h.
|
protected |
Definition at line 58 of file btCompoundShape.h.
|
protected |
Definition at line 68 of file btCompoundShape.h.
|
protected |
increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated
Definition at line 64 of file btCompoundShape.h.