Bullet Collision Detection & Physics Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btTriangleMeshShape Class Reference

The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. More...

#include <btTriangleMeshShape.h>

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

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
virtual ~btTriangleMeshShape ()
 
virtual btVector3 localGetSupportingVertex (const btVector3 &vec) const
 
virtual btVector3 localGetSupportingVertexWithoutMargin (const btVector3 &vec) const
 
void recalcLocalAabb ()
 
virtual void getAabb (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t. More...
 
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia) const
 
virtual void setLocalScaling (const btVector3 &scaling)
 
virtual const btVector3getLocalScaling () const
 
btStridingMeshInterfacegetMeshInterface ()
 
const btStridingMeshInterfacegetMeshInterface () const
 
const btVector3getLocalAabbMin () const
 
const btVector3getLocalAabbMax () const
 
virtual const char * getName () const
 
- Public Member Functions inherited from btConcaveShape
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btConcaveShape ()
 
virtual ~btConcaveShape ()
 
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
 
virtual btScalar getMargin () const
 
virtual void setMargin (btScalar collisionMargin)
 
- Public Member Functions inherited from btCollisionShape
 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. More...
 
virtual void getBoundingSphere (btVector3 &center, btScalar &radius) const
 
virtual btScalar getAngularMotionDisc () const
 getAngularMotionDisc returns the maximum radius needed for Conservative Advancement to handle time-of-impact with rotations. More...
 
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 More...
 
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) More...
 
virtual void setLocalScaling (const btVector3 &scaling)=0
 
virtual const btVector3getLocalScaling () 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 More...
 
virtual void setMargin (btScalar margin)=0
 
virtual btScalar getMargin () const =0
 
void setUserPointer (void *userPtr)
 optional user data pointer More...
 
void * getUserPointer () const
 
void setUserIndex (int index)
 
int getUserIndex () const
 
void setUserIndex2 (int index)
 
int getUserIndex2 () 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) More...
 
virtual void serializeSingleShape (btSerializer *serializer) const
 

Protected Member Functions

 btTriangleMeshShape (btStridingMeshInterface *meshInterface)
 btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class. More...
 

Protected Attributes

btVector3 m_localAabbMin
 
btVector3 m_localAabbMax
 
btStridingMeshInterfacem_meshInterface
 
- Protected Attributes inherited from btConcaveShape
btScalar m_collisionMargin
 
- Protected Attributes inherited from btCollisionShape
int m_shapeType
 
void * m_userPointer
 
int m_userIndex
 
int m_userIndex2
 

Detailed Description

The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead.

Definition at line 23 of file btTriangleMeshShape.h.

Constructor & Destructor Documentation

◆ btTriangleMeshShape()

btTriangleMeshShape::btTriangleMeshShape ( btStridingMeshInterface meshInterface)
protected

btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class.

Don't use btTriangleMeshShape but use btBvhTriangleMeshShape instead!

Definition at line 23 of file btTriangleMeshShape.cpp.

◆ ~btTriangleMeshShape()

btTriangleMeshShape::~btTriangleMeshShape ( )
virtual

Definition at line 37 of file btTriangleMeshShape.cpp.

Member Function Documentation

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

btTriangleMeshShape::BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ calculateLocalInertia()

void btTriangleMeshShape::calculateLocalInertia ( btScalar  mass,
btVector3 inertia 
) const
virtual

Implements btCollisionShape.

Definition at line 155 of file btTriangleMeshShape.cpp.

◆ getAabb()

void btTriangleMeshShape::getAabb ( const btTransform t,
btVector3 aabbMin,
btVector3 aabbMax 
) const
virtual

getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.

Implements btCollisionShape.

Definition at line 41 of file btTriangleMeshShape.cpp.

◆ getLocalAabbMax()

const btVector3 & btTriangleMeshShape::getLocalAabbMax ( ) const
inline

Definition at line 73 of file btTriangleMeshShape.h.

◆ getLocalAabbMin()

const btVector3 & btTriangleMeshShape::getLocalAabbMin ( ) const
inline

Definition at line 69 of file btTriangleMeshShape.h.

◆ getLocalScaling()

const btVector3 & btTriangleMeshShape::getLocalScaling ( ) const
virtual

Implements btCollisionShape.

Definition at line 118 of file btTriangleMeshShape.cpp.

◆ getMeshInterface() [1/2]

btStridingMeshInterface * btTriangleMeshShape::getMeshInterface ( )
inline

Definition at line 59 of file btTriangleMeshShape.h.

◆ getMeshInterface() [2/2]

const btStridingMeshInterface * btTriangleMeshShape::getMeshInterface ( ) const
inline

Definition at line 64 of file btTriangleMeshShape.h.

◆ getName()

virtual const char * btTriangleMeshShape::getName ( ) const
inlinevirtual

Implements btCollisionShape.

Reimplemented in btBvhTriangleMeshShape, and btMultimaterialTriangleMeshShape.

Definition at line 79 of file btTriangleMeshShape.h.

◆ localGetSupportingVertex()

btVector3 btTriangleMeshShape::localGetSupportingVertex ( const btVector3 vec) const
virtual

Definition at line 163 of file btTriangleMeshShape.cpp.

◆ localGetSupportingVertexWithoutMargin()

virtual btVector3 btTriangleMeshShape::localGetSupportingVertexWithoutMargin ( const btVector3 vec) const
inlinevirtual

Definition at line 42 of file btTriangleMeshShape.h.

◆ processAllTriangles()

void btTriangleMeshShape::processAllTriangles ( btTriangleCallback callback,
const btVector3 aabbMin,
const btVector3 aabbMax 
) const
virtual

Implements btConcaveShape.

Reimplemented in btBvhTriangleMeshShape.

Definition at line 125 of file btTriangleMeshShape.cpp.

◆ recalcLocalAabb()

void btTriangleMeshShape::recalcLocalAabb ( )

Definition at line 56 of file btTriangleMeshShape.cpp.

◆ setLocalScaling()

void btTriangleMeshShape::setLocalScaling ( const btVector3 scaling)
virtual

Implements btCollisionShape.

Reimplemented in btBvhTriangleMeshShape.

Definition at line 112 of file btTriangleMeshShape.cpp.

Member Data Documentation

◆ m_localAabbMax

btVector3 btTriangleMeshShape::m_localAabbMax
protected

Definition at line 28 of file btTriangleMeshShape.h.

◆ m_localAabbMin

btVector3 btTriangleMeshShape::m_localAabbMin
protected

Definition at line 27 of file btTriangleMeshShape.h.

◆ m_meshInterface

btStridingMeshInterface* btTriangleMeshShape::m_meshInterface
protected

Definition at line 29 of file btTriangleMeshShape.h.


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