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

The btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMeshShape. More...

#include <btScaledBvhTriangleMeshShape.h>

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

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btScaledBvhTriangleMeshShape (btBvhTriangleMeshShape *childShape, const btVector3 &localScaling)
 
virtual ~btScaledBvhTriangleMeshShape ()
 
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 setLocalScaling (const btVector3 &scaling)
 
virtual const btVector3getLocalScaling () const
 
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia) const
 
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
btBvhTriangleMeshShapegetChildShape ()
 
const btBvhTriangleMeshShapegetChildShape () 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) More...
 
- 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
 

Private Attributes

btVector3 m_localScaling
 
btBvhTriangleMeshShapem_bvhTriMeshShape
 

Additional Inherited Members

- 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 btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMeshShape.

Note that each btBvhTriangleMeshShape still can have its own local scaling, independent from this btScaledBvhTriangleMeshShape 'localScaling'

Definition at line 23 of file btScaledBvhTriangleMeshShape.h.

Constructor & Destructor Documentation

◆ btScaledBvhTriangleMeshShape()

btScaledBvhTriangleMeshShape::btScaledBvhTriangleMeshShape ( btBvhTriangleMeshShape childShape,
const btVector3 localScaling 
)

Definition at line 18 of file btScaledBvhTriangleMeshShape.cpp.

◆ ~btScaledBvhTriangleMeshShape()

btScaledBvhTriangleMeshShape::~btScaledBvhTriangleMeshShape ( )
virtual

Definition at line 24 of file btScaledBvhTriangleMeshShape.cpp.

Member Function Documentation

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

btScaledBvhTriangleMeshShape::BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ calculateLocalInertia()

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

don't make this a movable object!

Implements btCollisionShape.

Definition at line 111 of file btScaledBvhTriangleMeshShape.cpp.

◆ calculateSerializeBufferSize()

int btScaledBvhTriangleMeshShape::calculateSerializeBufferSize ( ) const
inlinevirtual

Reimplemented from btCollisionShape.

Definition at line 71 of file btScaledBvhTriangleMeshShape.h.

◆ getAabb()

void btScaledBvhTriangleMeshShape::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 72 of file btScaledBvhTriangleMeshShape.cpp.

◆ getChildShape() [1/2]

btBvhTriangleMeshShape * btScaledBvhTriangleMeshShape::getChildShape ( )
inline

Definition at line 44 of file btScaledBvhTriangleMeshShape.h.

◆ getChildShape() [2/2]

const btBvhTriangleMeshShape * btScaledBvhTriangleMeshShape::getChildShape ( ) const
inline

Definition at line 49 of file btScaledBvhTriangleMeshShape.h.

◆ getLocalScaling()

const btVector3 & btScaledBvhTriangleMeshShape::getLocalScaling ( ) const
virtual

Implements btCollisionShape.

Definition at line 106 of file btScaledBvhTriangleMeshShape.cpp.

◆ getName()

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

Implements btCollisionShape.

Definition at line 55 of file btScaledBvhTriangleMeshShape.h.

◆ processAllTriangles()

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

support negative scaling

Implements btConcaveShape.

Definition at line 51 of file btScaledBvhTriangleMeshShape.cpp.

◆ serialize()

const char * btScaledBvhTriangleMeshShape::serialize ( void *  dataBuffer,
btSerializer serializer 
) const
inlinevirtual

fills the dataBuffer and returns the struct name (and 0 on failure)

Reimplemented from btCollisionShape.

Definition at line 77 of file btScaledBvhTriangleMeshShape.h.

◆ setLocalScaling()

void btScaledBvhTriangleMeshShape::setLocalScaling ( const btVector3 scaling)
virtual

Implements btCollisionShape.

Definition at line 101 of file btScaledBvhTriangleMeshShape.cpp.

Member Data Documentation

◆ m_bvhTriMeshShape

btBvhTriangleMeshShape* btScaledBvhTriangleMeshShape::m_bvhTriMeshShape
private

Definition at line 28 of file btScaledBvhTriangleMeshShape.h.

◆ m_localScaling

btVector3 btScaledBvhTriangleMeshShape::m_localScaling
private

Definition at line 26 of file btScaledBvhTriangleMeshShape.h.


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