16 #ifndef BT_CAPSULE_SHAPE_H    17 #define BT_CAPSULE_SHAPE_H    47         virtual void    batchedUnitVectorGetSupportingVertexWithoutMargin(
const btVector3* vectors,
btVector3* supportVerticesOut,
int numVectors) 
const;
    52                 btVector3 oldMargin(getMargin(),getMargin(),getMargin());
    53                 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
    56                 btVector3 newMargin(getMargin(),getMargin(),getMargin());
    57                 m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
    63                         btVector3 halfExtents(getRadius(),getRadius(),getRadius());
    64                         halfExtents[m_upAxis] = getRadius() + getHalfHeight();
    65                         halfExtents += 
btVector3(getMargin(),getMargin(),getMargin());
    68             btVector3 extent = halfExtents.
dot3(abs_b[0], abs_b[1], abs_b[2]);
    70                         aabbMin = center - extent;
    71                         aabbMax = center + extent;
    76                 return "CapsuleShape";
    86                 int radiusAxis = (m_upAxis+2)%3;
    87                 return m_implicitShapeDimensions[radiusAxis];
    92                 return m_implicitShapeDimensions[m_upAxis];
    97                 btVector3 oldMargin(getMargin(),getMargin(),getMargin());
    98                 btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
    99                 btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
   103                 m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
   110                 aniDir[getUpAxis()]=1;
   115         virtual int     calculateSerializeBufferSize() 
const;
   118         virtual const char*     serialize(
void* dataBuffer, 
btSerializer* serializer) 
const;
   182         return "btCapsuleShapeData";
   194 #endif //BT_CAPSULE_SHAPE_H btCapsuleShapeX(btScalar radius, btScalar height)
btScalar m_collisionMargin
The btConvexInternalShape is an internal base class, shared by most convex shape implementations. 
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const 
fills the dataBuffer and returns the struct name (and 0 on failure) 
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const 
fills the dataBuffer and returns the struct name (and 0 on failure) 
The btCapsuleShape represents a capsule around the Y axis, there is also the btCapsuleShapeX aligned ...
virtual const char * getName() const 
btCapsuleShapeX represents a capsule around the Z axis the total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps. 
#define SIMD_FORCE_INLINE
virtual btVector3 getAnisotropicRollingFrictionDirection() const 
the getAnisotropicRollingFrictionDirection can be used in combination with setAnisotropicFriction See...
btScalar getRadius() const 
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
btVector3 m_implicitShapeDimensions
virtual void setMargin(btScalar margin)
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
btMatrix3x3 absolute() const 
Return the matrix with all values non negative. 
btCapsuleShape()
only used for btCapsuleShapeZ and btCapsuleShapeX subclasses. 
virtual int calculateSerializeBufferSize() const 
virtual void setMargin(btScalar collisionMargin)
btVector3FloatData m_localScaling
btVector3FloatData m_implicitShapeDimensions
btConvexInternalShapeData m_convexInternalShapeData
btVector3 can be used to represent 3D points and vectors. 
#define ATTRIBUTE_ALIGNED16(a)
virtual void setLocalScaling(const btVector3 &scaling)
virtual const char * getName() const 
virtual const char * getName() const 
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 dot3(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2) const 
btCapsuleShapeZ represents a capsule around the Z axis the total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps. 
virtual void setLocalScaling(const btVector3 &scaling)
void deSerializeFloat(struct btCapsuleShapeData *dataBuffer)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
void deSerializeFloat(const struct btVector3FloatData &dataIn)
btScalar getHalfHeight() const 
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...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...