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

Base class for gimpact shapes. More...

#include <btGImpactShape.h>

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

Public Member Functions

 btGImpactShapeInterface ()
 
void updateBound ()
 performs refit operation More...
 
void getAabb (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 If the Bounding box is not updated, then this class attemps to calculate it. More...
 
virtual void postUpdate ()
 Tells to this object that is needed to refit the box set. More...
 
const btAABBgetLocalBox ()
 Obtains the local box, which is the global calculated box of the total of subshapes. More...
 
virtual int getShapeType () const
 
virtual void setLocalScaling (const btVector3 &scaling)
 
virtual const btVector3getLocalScaling () const
 
virtual void setMargin (btScalar margin)
 
virtual void rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
 virtual method for ray collision More...
 
virtual void processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
 Function for retrieve triangles. More...
 
virtual void processAllTrianglesRay (btTriangleCallback *, const btVector3 &, const btVector3 &) const
 Function for retrieve triangles. More...
 
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType () const =0
 Subshape member functions. More...
 
const btGImpactBoxSetgetBoxSet () const
 gets boxset More...
 
bool hasBoxSet () const
 Determines if this class has a hierarchy structure for sorting its primitives. More...
 
virtual const btPrimitiveManagerBasegetPrimitiveManager () const =0
 Obtains the primitive manager. More...
 
virtual int getNumChildShapes () const =0
 Gets the number of children. More...
 
virtual bool childrenHasTransform () const =0
 if true, then its children must get transforms. More...
 
virtual bool needsRetrieveTriangles () const =0
 Determines if this shape has triangles. More...
 
virtual bool needsRetrieveTetrahedrons () const =0
 Determines if this shape has tetrahedrons. More...
 
virtual void getBulletTriangle (int prim_index, btTriangleShapeEx &triangle) const =0
 
virtual void getBulletTetrahedron (int prim_index, btTetrahedronShapeEx &tetrahedron) const =0
 
virtual void lockChildShapes () const
 call when reading child shapes More...
 
virtual void unlockChildShapes () const
 
void getPrimitiveTriangle (int index, btPrimitiveTriangle &triangle) const
 if this trimesh More...
 
virtual void getChildAabb (int child_index, const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 Retrieves the bound from a child. More...
 
virtual btCollisionShapegetChildShape (int index)=0
 Gets the children. More...
 
virtual const btCollisionShapegetChildShape (int index) const =0
 Gets the child. More...
 
virtual btTransform getChildTransform (int index) const =0
 Gets the children transform. More...
 
virtual void setChildTransform (int index, const btTransform &transform)=0
 Sets the children transform. 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
 

Protected Member Functions

virtual void calcLocalAABB ()
 use this function for perfofm refit in bounding boxes use this function for perfofm refit in bounding boxes More...
 

Protected Attributes

btAABB m_localAABB
 
bool m_needs_update
 
btVector3 localScaling
 
btGImpactBoxSet m_box_set
 
- 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

Base class for gimpact shapes.

Definition at line 73 of file btGImpactShape.h.

Constructor & Destructor Documentation

◆ btGImpactShapeInterface()

btGImpactShapeInterface::btGImpactShapeInterface ( )
inline

Definition at line 100 of file btGImpactShape.h.

Member Function Documentation

◆ calcLocalAABB()

virtual void btGImpactShapeInterface::calcLocalAABB ( )
inlineprotectedvirtual

use this function for perfofm refit in bounding boxes use this function for perfofm refit in bounding boxes

Reimplemented in btGImpactMeshShape.

Definition at line 83 of file btGImpactShape.h.

◆ childrenHasTransform()

virtual bool btGImpactShapeInterface::childrenHasTransform ( ) const
pure virtual

if true, then its children must get transforms.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getAabb()

void btGImpactShapeInterface::getAabb ( const btTransform t,
btVector3 aabbMin,
btVector3 aabbMax 
) const
inlinevirtual

If the Bounding box is not updated, then this class attemps to calculate it.

Postcondition
Calls updateBound() for update the box set.

Implements btCollisionShape.

Definition at line 126 of file btGImpactShape.h.

◆ getBoxSet()

const btGImpactBoxSet * btGImpactShapeInterface::getBoxSet ( ) const
inline

gets boxset

Definition at line 185 of file btGImpactShape.h.

◆ getBulletTetrahedron()

virtual void btGImpactShapeInterface::getBulletTetrahedron ( int  prim_index,
btTetrahedronShapeEx tetrahedron 
) const
pure virtual

◆ getBulletTriangle()

virtual void btGImpactShapeInterface::getBulletTriangle ( int  prim_index,
btTriangleShapeEx triangle 
) const
pure virtual

◆ getChildAabb()

virtual void btGImpactShapeInterface::getChildAabb ( int  child_index,
const btTransform t,
btVector3 aabbMin,
btVector3 aabbMax 
) const
inlinevirtual

Retrieves the bound from a child.

Reimplemented in btGImpactCompoundShape, and btGImpactMeshShape.

Definition at line 234 of file btGImpactShape.h.

◆ getChildShape() [1/2]

virtual const btCollisionShape * btGImpactShapeInterface::getChildShape ( int  index) const
pure virtual

Gets the child.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getChildShape() [2/2]

virtual btCollisionShape * btGImpactShapeInterface::getChildShape ( int  index)
pure virtual

Gets the children.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getChildTransform()

virtual btTransform btGImpactShapeInterface::getChildTransform ( int  index) const
pure virtual

Gets the children transform.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getGImpactShapeType()

virtual eGIMPACT_SHAPE_TYPE btGImpactShapeInterface::getGImpactShapeType ( ) const
pure virtual

Subshape member functions.

Base method for determinig which kind of GIMPACT shape we get

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getLocalBox()

const btAABB & btGImpactShapeInterface::getLocalBox ( )
inline

Obtains the local box, which is the global calculated box of the total of subshapes.

Definition at line 141 of file btGImpactShape.h.

◆ getLocalScaling()

virtual const btVector3 & btGImpactShapeInterface::getLocalScaling ( ) const
inlinevirtual

Implements btCollisionShape.

Reimplemented in btGImpactMeshShapePart.

Definition at line 160 of file btGImpactShape.h.

◆ getNumChildShapes()

virtual int btGImpactShapeInterface::getNumChildShapes ( ) const
pure virtual

Gets the number of children.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getPrimitiveManager()

virtual const btPrimitiveManagerBase * btGImpactShapeInterface::getPrimitiveManager ( ) const
pure virtual

Obtains the primitive manager.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ getPrimitiveTriangle()

void btGImpactShapeInterface::getPrimitiveTriangle ( int  index,
btPrimitiveTriangle triangle 
) const
inline

if this trimesh

Definition at line 226 of file btGImpactShape.h.

◆ getShapeType()

virtual int btGImpactShapeInterface::getShapeType ( ) const
inlinevirtual

Definition at line 146 of file btGImpactShape.h.

◆ hasBoxSet()

bool btGImpactShapeInterface::hasBoxSet ( ) const
inline

Determines if this class has a hierarchy structure for sorting its primitives.

Definition at line 191 of file btGImpactShape.h.

◆ lockChildShapes()

virtual void btGImpactShapeInterface::lockChildShapes ( ) const
inlinevirtual

call when reading child shapes

Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.

Definition at line 217 of file btGImpactShape.h.

◆ needsRetrieveTetrahedrons()

virtual bool btGImpactShapeInterface::needsRetrieveTetrahedrons ( ) const
pure virtual

Determines if this shape has tetrahedrons.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ needsRetrieveTriangles()

virtual bool btGImpactShapeInterface::needsRetrieveTriangles ( ) const
pure virtual

Determines if this shape has triangles.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ postUpdate()

virtual void btGImpactShapeInterface::postUpdate ( )
inlinevirtual

Tells to this object that is needed to refit the box set.

Reimplemented in btGImpactMeshShape.

Definition at line 135 of file btGImpactShape.h.

◆ processAllTriangles()

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

Function for retrieve triangles.

It gives the triangles in local space

Implements btConcaveShape.

Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.

Definition at line 272 of file btGImpactShape.h.

◆ processAllTrianglesRay()

virtual void btGImpactShapeInterface::processAllTrianglesRay ( btTriangleCallback ,
const btVector3 ,
const btVector3  
) const
inlinevirtual

Function for retrieve triangles.

It gives the triangles in local space

Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.

Definition at line 283 of file btGImpactShape.h.

◆ rayTest()

virtual void btGImpactShapeInterface::rayTest ( const btVector3 rayFrom,
const btVector3 rayTo,
btCollisionWorld::RayResultCallback resultCallback 
) const
inlinevirtual

virtual method for ray collision

Reimplemented in btGImpactMeshShape.

Definition at line 261 of file btGImpactShape.h.

◆ setChildTransform()

virtual void btGImpactShapeInterface::setChildTransform ( int  index,
const btTransform transform 
)
pure virtual

Sets the children transform.

Postcondition
You must call updateBound() for update the box set.

Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.

◆ setLocalScaling()

virtual void btGImpactShapeInterface::setLocalScaling ( const btVector3 scaling)
inlinevirtual
Postcondition
You must call updateBound() for update the box set.

Implements btCollisionShape.

Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.

Definition at line 154 of file btGImpactShape.h.

◆ setMargin()

virtual void btGImpactShapeInterface::setMargin ( btScalar  margin)
inlinevirtual

Reimplemented from btConcaveShape.

Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.

Definition at line 165 of file btGImpactShape.h.

◆ unlockChildShapes()

virtual void btGImpactShapeInterface::unlockChildShapes ( ) const
inlinevirtual

Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.

Definition at line 221 of file btGImpactShape.h.

◆ updateBound()

void btGImpactShapeInterface::updateBound ( )
inline

performs refit operation

Updates the entire Box set of this shape.

Precondition
postUpdate() must be called for attemps to calculating the box set, else this function will does nothing.
Postcondition
if m_needs_update == true, then it calls calcLocalAABB();

Definition at line 115 of file btGImpactShape.h.

Member Data Documentation

◆ localScaling

btVector3 btGImpactShapeInterface::localScaling
protected

Definition at line 78 of file btGImpactShape.h.

◆ m_box_set

btGImpactBoxSet btGImpactShapeInterface::m_box_set
protected

Definition at line 79 of file btGImpactShape.h.

◆ m_localAABB

btAABB btGImpactShapeInterface::m_localAABB
protected

Definition at line 76 of file btGImpactShape.h.

◆ m_needs_update

bool btGImpactShapeInterface::m_needs_update
protected

Definition at line 77 of file btGImpactShape.h.


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