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

This file was created by Alex Silverman. More...

#include <btMultimaterialTriangleMeshShape.h>

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

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btMultimaterialTriangleMeshShape (btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, bool buildBvh=true)
 
 btMultimaterialTriangleMeshShape (btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax, bool buildBvh=true)
 optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb More...
 
virtual ~btMultimaterialTriangleMeshShape ()
 
virtual const char * getName () const
 
const btMaterialgetMaterialProperties (int partID, int triIndex)
 Obtains the material for a specific triangle. More...
 
- Public Member Functions inherited from btBvhTriangleMeshShape
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btBvhTriangleMeshShape (btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, bool buildBvh=true)
 Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. More...
 
 btBvhTriangleMeshShape (btStridingMeshInterface *meshInterface, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax, bool buildBvh=true)
 optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb More...
 
virtual ~btBvhTriangleMeshShape ()
 
bool getOwnsBvh () const
 
void performRaycast (btTriangleCallback *callback, const btVector3 &raySource, const btVector3 &rayTarget)
 
void performConvexcast (btTriangleCallback *callback, const btVector3 &boxSource, const btVector3 &boxTarget, const btVector3 &boxMin, const btVector3 &boxMax)
 
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 
void refitTree (const btVector3 &aabbMin, const btVector3 &aabbMax)
 
void partialRefitTree (const btVector3 &aabbMin, const btVector3 &aabbMax)
 for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks More...
 
virtual const char * getName () const
 
virtual void setLocalScaling (const btVector3 &scaling)
 
btOptimizedBvhgetOptimizedBvh ()
 
void setOptimizedBvh (btOptimizedBvh *bvh, const btVector3 &localScaling=btVector3(1, 1, 1))
 
void buildOptimizedBvh ()
 
bool usesQuantizedAabbCompression () const
 
void setTriangleInfoMap (btTriangleInfoMap *triangleInfoMap)
 
const btTriangleInfoMapgetTriangleInfoMap () const
 
btTriangleInfoMapgetTriangleInfoMap ()
 
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 serializeSingleBvh (btSerializer *serializer) const
 
virtual void serializeSingleTriangleInfoMap (btSerializer *serializer) const
 
- Public Member Functions inherited from btTriangleMeshShape
 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
 

Private Attributes

btAlignedObjectArray< btMaterial * > m_materialList
 

Additional Inherited Members

- Protected Member Functions inherited from btTriangleMeshShape
 btTriangleMeshShape (btStridingMeshInterface *meshInterface)
 btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class. More...
 
- Protected Attributes inherited from btTriangleMeshShape
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

This file was created by Alex Silverman.

The BvhTriangleMaterialMeshShape extends the btBvhTriangleMeshShape. Its main contribution is the interface into a material array, which allows per-triangle friction and restitution.

Definition at line 25 of file btMultimaterialTriangleMeshShape.h.

Constructor & Destructor Documentation

◆ btMultimaterialTriangleMeshShape() [1/2]

btMultimaterialTriangleMeshShape::btMultimaterialTriangleMeshShape ( btStridingMeshInterface meshInterface,
bool  useQuantizedAabbCompression,
bool  buildBvh = true 
)
inline

Definition at line 33 of file btMultimaterialTriangleMeshShape.h.

◆ btMultimaterialTriangleMeshShape() [2/2]

btMultimaterialTriangleMeshShape::btMultimaterialTriangleMeshShape ( btStridingMeshInterface meshInterface,
bool  useQuantizedAabbCompression,
const btVector3 bvhAabbMin,
const btVector3 bvhAabbMax,
bool  buildBvh = true 
)
inline

optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb

Definition at line 65 of file btMultimaterialTriangleMeshShape.h.

◆ ~btMultimaterialTriangleMeshShape()

virtual btMultimaterialTriangleMeshShape::~btMultimaterialTriangleMeshShape ( )
inlinevirtual

Definition at line 96 of file btMultimaterialTriangleMeshShape.h.

Member Function Documentation

◆ BT_DECLARE_ALIGNED_ALLOCATOR()

btMultimaterialTriangleMeshShape::BT_DECLARE_ALIGNED_ALLOCATOR ( )

◆ getMaterialProperties()

const btMaterial * btMultimaterialTriangleMeshShape::getMaterialProperties ( int  partID,
int  triIndex 
)

Obtains the material for a specific triangle.

This file was created by Alex Silverman.

Obtains the material for a specific triangle

Definition at line 23 of file btMultimaterialTriangleMeshShape.cpp.

◆ getName()

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

Reimplemented from btBvhTriangleMeshShape.

Definition at line 109 of file btMultimaterialTriangleMeshShape.h.

Member Data Documentation

◆ m_materialList

btAlignedObjectArray<btMaterial *> btMultimaterialTriangleMeshShape::m_materialList
private

Definition at line 28 of file btMultimaterialTriangleMeshShape.h.


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