Blender  V3.3
Classes | Public Member Functions | Protected Attributes | List of all members
btGImpactCompoundShape Class Reference

btGImpactCompoundShape allows to handle multiple btCollisionShape objects at once More...

#include <btGImpactShape.h>

Inheritance diagram for btGImpactCompoundShape:
btGImpactShapeInterface

Classes

class  CompoundPrimitiveManager
 compound primitive manager More...
 

Public Member Functions

 btGImpactCompoundShape (bool children_has_transform=true)
 
virtual ~btGImpactCompoundShape ()
 
virtual bool childrenHasTransform () const
 if true, then its children must get transforms. More...
 
virtual const btPrimitiveManagerBasegetPrimitiveManager () const
 Obtains the primitive manager. More...
 
SIMD_FORCE_INLINE CompoundPrimitiveManagergetCompoundPrimitiveManager ()
 Obtains the compopund primitive manager. More...
 
virtual int getNumChildShapes () const
 Gets the number of children. More...
 
void addChildShape (const btTransform &localTransform, btCollisionShape *shape)
 Use this method for adding children. Only Convex shapes are allowed. More...
 
void addChildShape (btCollisionShape *shape)
 Use this method for adding children. Only Convex shapes are allowed. More...
 
virtual btCollisionShapegetChildShape (int index)
 Gets the children. More...
 
virtual const btCollisionShapegetChildShape (int index) const
 Gets the children. More...
 
virtual void getChildAabb (int child_index, const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
 Retrieves the bound from a child. More...
 
virtual btTransform getChildTransform (int index) const
 Gets the children transform. More...
 
virtual void setChildTransform (int index, const btTransform &transform)
 Sets the children transform. More...
 
virtual bool needsRetrieveTriangles () const
 Determines if this shape has triangles. More...
 
virtual bool needsRetrieveTetrahedrons () const
 Determines if this shape has tetrahedrons. More...
 
virtual void getBulletTriangle (int prim_index, btTriangleShapeEx &triangle) const
 
virtual void getBulletTetrahedron (int prim_index, btTetrahedronShapeEx &tetrahedron) const
 
virtual void calculateLocalInertia (btScalar mass, btVector3 &inertia) const
 Calculates the exact inertia tensor for this shape. More...
 
virtual const char * getName () const
 
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType () const
 Base method for determinig which kind of GIMPACT shape we get. More...
 
- Public Member Functions inherited from btGImpactShapeInterface
 btGImpactShapeInterface ()
 
SIMD_FORCE_INLINE 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...
 
SIMD_FORCE_INLINE 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...
 
SIMD_FORCE_INLINE const btGImpactBoxSetgetBoxSet () const
 gets boxset More...
 
SIMD_FORCE_INLINE bool hasBoxSet () const
 Determines if this class has a hierarchy structure for sorting its primitives. More...
 
virtual void lockChildShapes () const
 call when reading child shapes More...
 
virtual void unlockChildShapes () const
 
SIMD_FORCE_INLINE void getPrimitiveTriangle (int index, btPrimitiveTriangle &triangle) const
 if this trimesh More...
 

Protected Attributes

CompoundPrimitiveManager m_primitive_manager
 
btAlignedObjectArray< btTransformm_childTransforms
 
btAlignedObjectArray< btCollisionShape * > m_childShapes
 
- Protected Attributes inherited from btGImpactShapeInterface
btAABB m_localAABB
 
bool m_needs_update
 
btVector3 localScaling
 
btGImpactBoxSet m_box_set
 

Additional Inherited Members

- Protected Member Functions inherited from btGImpactShapeInterface
virtual void calcLocalAABB ()
 

Detailed Description

btGImpactCompoundShape allows to handle multiple btCollisionShape objects at once

This class only can manage Convex subshapes

Definition at line 294 of file btGImpactShape.h.

Constructor & Destructor Documentation

◆ btGImpactCompoundShape()

btGImpactCompoundShape::btGImpactCompoundShape ( bool  children_has_transform = true)
inline

◆ ~btGImpactCompoundShape()

virtual btGImpactCompoundShape::~btGImpactCompoundShape ( )
inlinevirtual

Definition at line 366 of file btGImpactShape.h.

Member Function Documentation

◆ addChildShape() [1/2]

void btGImpactCompoundShape::addChildShape ( btCollisionShape shape)
inline

Use this method for adding children. Only Convex shapes are allowed.

Definition at line 404 of file btGImpactShape.h.

References btAssert, m_childShapes, and btAlignedObjectArray< T >::push_back().

◆ addChildShape() [2/2]

void btGImpactCompoundShape::addChildShape ( const btTransform localTransform,
btCollisionShape shape 
)
inline

Use this method for adding children. Only Convex shapes are allowed.

Definition at line 396 of file btGImpactShape.h.

References btAssert, m_childShapes, m_childTransforms, and btAlignedObjectArray< T >::push_back().

◆ calculateLocalInertia()

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

◆ childrenHasTransform()

virtual bool btGImpactCompoundShape::childrenHasTransform ( ) const
inlinevirtual

if true, then its children must get transforms.

Implements btGImpactShapeInterface.

Definition at line 371 of file btGImpactShape.h.

References m_childTransforms, and btAlignedObjectArray< T >::size().

Referenced by calculateLocalInertia(), btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box(), and getChildAabb().

◆ getBulletTetrahedron()

virtual void btGImpactCompoundShape::getBulletTetrahedron ( int  prim_index,
btTetrahedronShapeEx tetrahedron 
) const
inlinevirtual

Implements btGImpactShapeInterface.

Definition at line 474 of file btGImpactShape.h.

References btAssert, and void.

◆ getBulletTriangle()

virtual void btGImpactCompoundShape::getBulletTriangle ( int  prim_index,
btTriangleShapeEx triangle 
) const
inlinevirtual

Implements btGImpactShapeInterface.

Definition at line 467 of file btGImpactShape.h.

References btAssert, and void.

◆ getChildAabb()

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

Retrieves the bound from a child.

Reimplemented from btGImpactShapeInterface.

Definition at line 425 of file btGImpactShape.h.

References childrenHasTransform(), m_childShapes, m_childTransforms, and t.

◆ getChildShape() [1/2]

virtual btCollisionShape* btGImpactCompoundShape::getChildShape ( int  index)
inlinevirtual

Gets the children.

Implements btGImpactShapeInterface.

Definition at line 411 of file btGImpactShape.h.

References m_childShapes.

Referenced by btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box().

◆ getChildShape() [2/2]

virtual const btCollisionShape* btGImpactCompoundShape::getChildShape ( int  index) const
inlinevirtual

Gets the children.

Implements btGImpactShapeInterface.

Definition at line 417 of file btGImpactShape.h.

References m_childShapes.

◆ getChildTransform()

virtual btTransform btGImpactCompoundShape::getChildTransform ( int  index) const
inlinevirtual

◆ getCompoundPrimitiveManager()

SIMD_FORCE_INLINE CompoundPrimitiveManager* btGImpactCompoundShape::getCompoundPrimitiveManager ( )
inline

Obtains the compopund primitive manager.

Definition at line 384 of file btGImpactShape.h.

References m_primitive_manager.

◆ getGImpactShapeType()

virtual eGIMPACT_SHAPE_TYPE btGImpactCompoundShape::getGImpactShapeType ( ) const
inlinevirtual

Base method for determinig which kind of GIMPACT shape we get.

Subshape member functions

Implements btGImpactShapeInterface.

Definition at line 489 of file btGImpactShape.h.

References CONST_GIMPACT_COMPOUND_SHAPE.

◆ getName()

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

Definition at line 484 of file btGImpactShape.h.

◆ getNumChildShapes()

virtual int btGImpactCompoundShape::getNumChildShapes ( ) const
inlinevirtual

◆ getPrimitiveManager()

virtual const btPrimitiveManagerBase* btGImpactCompoundShape::getPrimitiveManager ( ) const
inlinevirtual

Obtains the primitive manager.

Implements btGImpactShapeInterface.

Definition at line 378 of file btGImpactShape.h.

References m_primitive_manager.

◆ needsRetrieveTetrahedrons()

virtual bool btGImpactCompoundShape::needsRetrieveTetrahedrons ( ) const
inlinevirtual

Determines if this shape has tetrahedrons.

Implements btGImpactShapeInterface.

Definition at line 462 of file btGImpactShape.h.

◆ needsRetrieveTriangles()

virtual bool btGImpactCompoundShape::needsRetrieveTriangles ( ) const
inlinevirtual

Determines if this shape has triangles.

Implements btGImpactShapeInterface.

Definition at line 456 of file btGImpactShape.h.

◆ setChildTransform()

virtual void btGImpactCompoundShape::setChildTransform ( int  index,
const btTransform transform 
)
inlinevirtual

Sets the children transform.

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

Implements btGImpactShapeInterface.

Definition at line 448 of file btGImpactShape.h.

References btAssert, m_childShapes, m_childTransforms, btGImpactShapeInterface::postUpdate(), btAlignedObjectArray< T >::size(), and transform().

Member Data Documentation

◆ m_childShapes

btAlignedObjectArray<btCollisionShape*> btGImpactCompoundShape::m_childShapes
protected

◆ m_childTransforms

btAlignedObjectArray<btTransform> btGImpactCompoundShape::m_childTransforms
protected

◆ m_primitive_manager

CompoundPrimitiveManager btGImpactCompoundShape::m_primitive_manager
protected

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