Public Member Functions | Private Attributes

btMultiSphereShape Class Reference

The btMultiSphereShape represents the convex hull of a collection of spheres. More...

#include <btMultiSphereShape.h>

Inheritance diagram for btMultiSphereShape:
Inheritance graph
[legend]
Collaboration diagram for btMultiSphereShape:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 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 btVector3getSpherePosition (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)

Private Attributes

btAlignedObjectArray< btVector3m_localPositionArray
btAlignedObjectArray< btScalarm_radiArray

Detailed Description

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.


Constructor & Destructor Documentation

btMultiSphereShape::btMultiSphereShape ( const btVector3 positions,
const btScalar radi,
int  numSpheres 
)

Definition at line 23 of file btMultiSphereShape.cpp.


Member Function Documentation

void btMultiSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin ( const btVector3 vectors,
btVector3 supportVerticesOut,
int  numVectors 
) const [virtual]

Implements btConvexShape.

Definition at line 92 of file btMultiSphereShape.cpp.

btMultiSphereShape::BT_DECLARE_ALIGNED_ALLOCATOR (  ) 

Reimplemented from btConvexInternalShape.

void btMultiSphereShape::calculateLocalInertia ( btScalar  mass,
btVector3 inertia 
) const [virtual]

CollisionShape Interface.

Implements btCollisionShape.

Definition at line 136 of file btMultiSphereShape.cpp.

int btMultiSphereShape::calculateSerializeBufferSize (  )  const [inline, virtual]

Reimplemented from btConvexInternalShape.

Definition at line 94 of file btMultiSphereShape.h.

virtual const char* btMultiSphereShape::getName (  )  const [inline, virtual]

Implements btCollisionShape.

Definition at line 63 of file btMultiSphereShape.h.

int btMultiSphereShape::getSphereCount (  )  const [inline]

Definition at line 47 of file btMultiSphereShape.h.

const btVector3& btMultiSphereShape::getSpherePosition ( int  index  )  const [inline]

Definition at line 52 of file btMultiSphereShape.h.

btScalar btMultiSphereShape::getSphereRadius ( int  index  )  const [inline]

Definition at line 57 of file btMultiSphereShape.h.

btVector3 btMultiSphereShape::localGetSupportingVertexWithoutMargin ( const btVector3 vec  )  const [virtual]

btConvexShape Interface

Implements btConvexShape.

Definition at line 45 of file btMultiSphereShape.cpp.

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 156 of file btMultiSphereShape.cpp.


Member Data Documentation

Definition at line 31 of file btMultiSphereShape.h.

Definition at line 32 of file btMultiSphereShape.h.


The documentation for this class was generated from the following files: