The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects. More...
#include <btCollisionShape.h>
Public Member Functions | |
BT_DECLARE_ALIGNED_ALLOCATOR () | |
btCollisionShape () | |
virtual | ~btCollisionShape () |
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 void | getBoundingSphere (btVector3 ¢er, btScalar &radius) const |
virtual btScalar | getAngularMotionDisc () const |
getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations. | |
virtual btScalar | getContactBreakingThreshold (btScalar defaultContactThresholdFactor) const |
void | calculateTemporalAabb (const btTransform &curTrans, const btVector3 &linvel, const btVector3 &angvel, btScalar timeStep, btVector3 &temporalAabbMin, btVector3 &temporalAabbMax) const |
calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep) result is conservative | |
bool | isPolyhedral () const |
bool | isConvex2d () const |
bool | isConvex () const |
bool | isNonMoving () const |
bool | isConcave () const |
bool | isCompound () const |
bool | isSoftBody () const |
bool | isInfinite () const |
isInfinite is used to catch simulation error (aabb check) | |
virtual void | setLocalScaling (const btVector3 &scaling)=0 |
virtual const btVector3 & | getLocalScaling () const =0 |
virtual void | calculateLocalInertia (btScalar mass, btVector3 &inertia) const =0 |
virtual const char * | getName () const =0 |
int | getShapeType () const |
virtual btVector3 | getAnisotropicRollingFrictionDirection () const |
the getAnisotropicRollingFrictionDirection can be used in combination with setAnisotropicFriction See Bullet/Demos/RollingFrictionDemo for an example | |
virtual void | setMargin (btScalar margin)=0 |
virtual btScalar | getMargin () const =0 |
void | setUserPointer (void *userPtr) |
optional user data pointer | |
void * | getUserPointer () 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) | |
virtual void | serializeSingleShape (btSerializer *serializer) const |
Protected Attributes | |
int | m_shapeType |
void * | m_userPointer |
The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects.
Definition at line 27 of file btCollisionShape.h.
btCollisionShape::btCollisionShape | ( | ) | [inline] |
Definition at line 37 of file btCollisionShape.h.
virtual btCollisionShape::~btCollisionShape | ( | ) | [inline, virtual] |
Definition at line 41 of file btCollisionShape.h.
btCollisionShape::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
Reimplemented in btBox2dShape, btBoxShape, btBvhTriangleMeshShape, btCapsuleShape, btCompoundShape, btConcaveShape, btConeShape, btConvex2dShape, btConvexHullShape, btConvexInternalShape, btConvexPointCloudShape, btConvexShape, btConvexTriangleMeshShape, btCylinderShape, btCylinderShapeX, btCylinderShapeZ, btEmptyShape, btHeightfieldTerrainShape, btMinkowskiSumShape, btMultimaterialTriangleMeshShape, btMultiSphereShape, btPolyhedralConvexShape, btScaledBvhTriangleMeshShape, btSphereShape, btStaticPlaneShape, btBU_Simplex1to4, btTriangleMeshShape, btTriangleShape, and btUniformScalingShape.
virtual void btCollisionShape::calculateLocalInertia | ( | btScalar | mass, | |
btVector3 & | inertia | |||
) | const [pure virtual] |
Implemented in btBox2dShape, btBoxShape, btCapsuleShape, btCompoundShape, btConeShape, btConvex2dShape, btCylinderShape, btEmptyShape, btHeightfieldTerrainShape, btMinkowskiSumShape, btMultiSphereShape, btPolyhedralConvexShape, btScaledBvhTriangleMeshShape, btSphereShape, btStaticPlaneShape, btTriangleMeshShape, btTriangleShape, btUniformScalingShape, btGImpactCompoundShape, btGImpactMeshShapePart, btGImpactMeshShape, btSoftBodyCollisionShape, and btSoftClusterCollisionShape.
int btCollisionShape::calculateSerializeBufferSize | ( | ) | const [inline, virtual] |
Reimplemented in btBvhTriangleMeshShape, btCapsuleShape, btCompoundShape, btConvexHullShape, btConvexInternalShape, btCylinderShape, btMultiSphereShape, btScaledBvhTriangleMeshShape, btStaticPlaneShape, and btGImpactMeshShape.
Definition at line 151 of file btCollisionShape.h.
void btCollisionShape::calculateTemporalAabb | ( | const btTransform & | curTrans, | |
const btVector3 & | linvel, | |||
const btVector3 & | angvel, | |||
btScalar | timeStep, | |||
btVector3 & | temporalAabbMin, | |||
btVector3 & | temporalAabbMax | |||
) | const |
calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep) result is conservative
Definition at line 60 of file btCollisionShape.cpp.
virtual void btCollisionShape::getAabb | ( | const btTransform & | t, | |
btVector3 & | aabbMin, | |||
btVector3 & | aabbMax | |||
) | const [pure virtual] |
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
Implemented in btBox2dShape, btBoxShape, btCapsuleShape, btCompoundShape, btConvex2dShape, btConvexInternalShape, btConvexInternalAabbCachingShape, btConvexShape, btCylinderShape, btEmptyShape, btHeightfieldTerrainShape, btPolyhedralConvexAabbCachingShape, btScaledBvhTriangleMeshShape, btSphereShape, btStaticPlaneShape, btBU_Simplex1to4, btTriangleMeshShape, btTriangleShape, btUniformScalingShape, btGImpactShapeInterface, btTriangleShapeEx, btSoftBodyCollisionShape, and btSoftClusterCollisionShape.
btScalar btCollisionShape::getAngularMotionDisc | ( | ) | const [virtual] |
getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations.
Definition at line 50 of file btCollisionShape.cpp.
virtual btVector3 btCollisionShape::getAnisotropicRollingFrictionDirection | ( | ) | const [inline, virtual] |
the getAnisotropicRollingFrictionDirection can be used in combination with setAnisotropicFriction See Bullet/Demos/RollingFrictionDemo for an example
Reimplemented in btCapsuleShape, btConeShape, btConeShapeX, btConeShapeZ, and btCylinderShape.
Definition at line 115 of file btCollisionShape.h.
Definition at line 32 of file btCollisionShape.cpp.
btScalar btCollisionShape::getContactBreakingThreshold | ( | btScalar | defaultContactThresholdFactor | ) | const [virtual] |
Definition at line 45 of file btCollisionShape.cpp.
virtual const btVector3& btCollisionShape::getLocalScaling | ( | ) | const [pure virtual] |
Implemented in btCompoundShape, btConvex2dShape, btConvexInternalShape, btConvexShape, btConvexTriangleMeshShape, btEmptyShape, btHeightfieldTerrainShape, btScaledBvhTriangleMeshShape, btStaticPlaneShape, btTriangleMeshShape, btUniformScalingShape, btGImpactShapeInterface, btGImpactMeshShapePart, and btSoftBodyCollisionShape.
virtual btScalar btCollisionShape::getMargin | ( | ) | const [pure virtual] |
virtual const char* btCollisionShape::getName | ( | ) | const [pure virtual] |
Implemented in btBox2dShape, btBoxShape, btBvhTriangleMeshShape, btCapsuleShape, btCapsuleShapeX, btCapsuleShapeZ, btCompoundShape, btConeShape, btConvex2dShape, btConvexHullShape, btConvexPointCloudShape, btConvexTriangleMeshShape, btCylinderShape, btCylinderShapeX, btCylinderShapeZ, btEmptyShape, btHeightfieldTerrainShape, btMinkowskiSumShape, btMultimaterialTriangleMeshShape, btMultiSphereShape, btScaledBvhTriangleMeshShape, btSphereShape, btStaticPlaneShape, btBU_Simplex1to4, btTriangleMeshShape, btTriangleShape, btUniformScalingShape, btGImpactCompoundShape, btGImpactMeshShapePart, btGImpactMeshShape, btSoftBodyCollisionShape, and btSoftClusterCollisionShape.
int btCollisionShape::getShapeType | ( | ) | const [inline] |
Reimplemented in btGImpactShapeInterface, and btSoftClusterCollisionShape.
Definition at line 111 of file btCollisionShape.h.
void* btCollisionShape::getUserPointer | ( | ) | const [inline] |
Definition at line 129 of file btCollisionShape.h.
bool btCollisionShape::isCompound | ( | ) | const [inline] |
Definition at line 84 of file btCollisionShape.h.
bool btCollisionShape::isConcave | ( | ) | const [inline] |
Definition at line 80 of file btCollisionShape.h.
bool btCollisionShape::isConvex | ( | ) | const [inline] |
Definition at line 72 of file btCollisionShape.h.
bool btCollisionShape::isConvex2d | ( | ) | const [inline] |
Definition at line 67 of file btCollisionShape.h.
bool btCollisionShape::isInfinite | ( | ) | const [inline] |
isInfinite is used to catch simulation error (aabb check)
Definition at line 95 of file btCollisionShape.h.
bool btCollisionShape::isNonMoving | ( | ) | const [inline] |
Definition at line 76 of file btCollisionShape.h.
bool btCollisionShape::isPolyhedral | ( | ) | const [inline] |
Definition at line 62 of file btCollisionShape.h.
bool btCollisionShape::isSoftBody | ( | ) | const [inline] |
Definition at line 89 of file btCollisionShape.h.
const char * btCollisionShape::serialize | ( | void * | dataBuffer, | |
btSerializer * | serializer | |||
) | const [virtual] |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented in btBvhTriangleMeshShape, btCapsuleShape, btCompoundShape, btConvexHullShape, btConvexInternalShape, btCylinderShape, btMultiSphereShape, btScaledBvhTriangleMeshShape, btStaticPlaneShape, and btGImpactMeshShape.
Definition at line 99 of file btCollisionShape.cpp.
void btCollisionShape::serializeSingleShape | ( | btSerializer * | serializer | ) | const [virtual] |
Definition at line 113 of file btCollisionShape.cpp.
virtual void btCollisionShape::setLocalScaling | ( | const btVector3 & | scaling | ) | [pure virtual] |
Implemented in btBox2dShape, btBoxShape, btBvhTriangleMeshShape, btCapsuleShape, btCompoundShape, btConeShape, btConvex2dShape, btConvexHullShape, btConvexInternalShape, btConvexInternalAabbCachingShape, btConvexPointCloudShape, btConvexShape, btConvexTriangleMeshShape, btCylinderShape, btEmptyShape, btHeightfieldTerrainShape, btPolyhedralConvexAabbCachingShape, btScaledBvhTriangleMeshShape, btStaticPlaneShape, btTriangleMeshShape, btUniformScalingShape, btGImpactShapeInterface, btGImpactMeshShapePart, btGImpactMeshShape, and btSoftBodyCollisionShape.
virtual void btCollisionShape::setMargin | ( | btScalar | margin | ) | [pure virtual] |
Implemented in btBox2dShape, btBoxShape, btCapsuleShape, btCompoundShape, btConcaveShape, btConvex2dShape, btConvexInternalShape, btConvexShape, btCylinderShape, btSphereShape, btUniformScalingShape, btGImpactShapeInterface, btGImpactMeshShapePart, btGImpactMeshShape, and btSoftClusterCollisionShape.
void btCollisionShape::setUserPointer | ( | void * | userPtr | ) | [inline] |
optional user data pointer
Definition at line 124 of file btCollisionShape.h.
int btCollisionShape::m_shapeType [protected] |
Definition at line 30 of file btCollisionShape.h.
void* btCollisionShape::m_userPointer [protected] |
Definition at line 31 of file btCollisionShape.h.