Blender V2.61 - r43446
|
#include <btMultiSphereShape.h>
Public Member Functions | |
btMultiSphereShape (const btVector3 *positions, const btScalar *radi, int numSpheres) | |
virtual void | calculateLocalInertia (btScalar mass, btVector3 &inertia) const |
CollisionShape Interface. | |
virtual btVector3 | localGetSupportingVertexWithoutMargin (const btVector3 &vec) const |
btConvexShape Interface | |
virtual void | batchedUnitVectorGetSupportingVertexWithoutMargin (const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const |
int | getSphereCount () const |
const btVector3 & | getSpherePosition (int index) const |
btScalar | getSphereRadius (int index) const |
virtual const char * | getName () const |
virtual int | calculateSerializeBufferSize () const |
virtual const char * | serialize (void *dataBuffer, btSerializer *serializer) const |
fills the dataBuffer and returns the struct name (and 0 on failure) |
The btMultiSphereShape represents the convex hull of a collection of spheres. You can create special capsules or other smooth volumes. It is possible to animate the spheres for deformation, but call 'recalcLocalAabb' after changing any sphere position/radius
Definition at line 28 of file btMultiSphereShape.h.
btMultiSphereShape::btMultiSphereShape | ( | const btVector3 * | positions, |
const btScalar * | radi, | ||
int | numSpheres | ||
) |
Definition at line 23 of file btMultiSphereShape.cpp.
References i, MULTI_SPHERE_SHAPE_PROXYTYPE, btConvexInternalAabbCachingShape::recalcLocalAabb(), and btAlignedObjectArray< T >::resize().
void btMultiSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin | ( | const btVector3 * | vectors, |
btVector3 * | supportVerticesOut, | ||
int | numVectors | ||
) | const [virtual] |
Definition at line 86 of file btMultiSphereShape.cpp.
References BT_LARGE_FLOAT, btConvexInternalShape::getMargin(), i, btConvexInternalShape::m_localScaling, and btAlignedObjectArray< T >::size().
void btMultiSphereShape::calculateLocalInertia | ( | btScalar | mass, |
btVector3 & | inertia | ||
) | const [virtual] |
CollisionShape Interface.
Definition at line 123 of file btMultiSphereShape.cpp.
References btConvexInternalAabbCachingShape::getCachedLocalAabb().
SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBufferSize | ( | ) | const [virtual] |
Reimplemented from btConvexInternalShape.
Definition at line 92 of file btMultiSphereShape.h.
virtual const char* btMultiSphereShape::getName | ( | void | ) | const [inline, virtual] |
Definition at line 61 of file btMultiSphereShape.h.
int btMultiSphereShape::getSphereCount | ( | ) | const [inline] |
Definition at line 45 of file btMultiSphereShape.h.
References btAlignedObjectArray< T >::size().
Referenced by btCollisionWorld::debugDrawObject().
const btVector3& btMultiSphereShape::getSpherePosition | ( | int | index | ) | const [inline] |
Definition at line 50 of file btMultiSphereShape.h.
Referenced by btCollisionWorld::debugDrawObject().
btScalar btMultiSphereShape::getSphereRadius | ( | int | index | ) | const [inline] |
Definition at line 55 of file btMultiSphereShape.h.
Referenced by btCollisionWorld::debugDrawObject().
btVector3 btMultiSphereShape::localGetSupportingVertexWithoutMargin | ( | const btVector3 & | vec | ) | const [virtual] |
btConvexShape Interface
Definition at line 43 of file btMultiSphereShape.cpp.
References BT_LARGE_FLOAT, btSqrt(), btConvexInternalShape::getMargin(), i, btConvexInternalShape::m_localScaling, SIMD_EPSILON, and btAlignedObjectArray< T >::size().
const char * btMultiSphereShape::serialize | ( | void * | dataBuffer, |
btSerializer * | serializer | ||
) | const [virtual] |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented from btConvexInternalShape.
Definition at line 143 of file btMultiSphereShape.cpp.
References btSerializer::allocate(), BT_ARRAY_CODE, btSerializer::finalizeChunk(), btSerializer::getUniquePointer(), i, btMultiSphereShapeData::m_convexInternalShapeData, btMultiSphereShapeData::m_localPositionArrayPtr, btMultiSphereShapeData::m_localPositionArraySize, btChunk::m_oldPtr, btPositionAndRadius::m_pos, btPositionAndRadius::m_radius, and btAlignedObjectArray< T >::size().