Blender
V3.3
|
btGImpactCompoundShape allows to handle multiple btCollisionShape objects at once More...
#include <btGImpactShape.h>
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 btPrimitiveManagerBase * | getPrimitiveManager () const |
Obtains the primitive manager. More... | |
SIMD_FORCE_INLINE CompoundPrimitiveManager * | getCompoundPrimitiveManager () |
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 btCollisionShape * | getChildShape (int index) |
Gets the children. More... | |
virtual const btCollisionShape * | getChildShape (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... | |
![]() | |
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 btAABB & | getLocalBox () |
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 btVector3 & | getLocalScaling () 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 btGImpactBoxSet * | getBoxSet () 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< btTransform > | m_childTransforms |
btAlignedObjectArray< btCollisionShape * > | m_childShapes |
![]() | |
btAABB | m_localAABB |
bool | m_needs_update |
btVector3 | localScaling |
btGImpactBoxSet | m_box_set |
Additional Inherited Members | |
![]() | |
virtual void | calcLocalAABB () |
btGImpactCompoundShape allows to handle multiple btCollisionShape objects at once
This class only can manage Convex subshapes
Definition at line 294 of file btGImpactShape.h.
|
inline |
Definition at line 359 of file btGImpactShape.h.
References btGImpactShapeInterface::m_box_set, btGImpactCompoundShape::CompoundPrimitiveManager::m_compoundShape, m_primitive_manager, btGImpactQuantizedBvh::setPrimitiveManager(), and void.
|
inlinevirtual |
Definition at line 366 of file btGImpactShape.h.
|
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().
|
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().
|
virtual |
Calculates the exact inertia tensor for this shape.
Definition at line 78 of file btGImpactShape.cpp.
References btVector3, childrenHasTransform(), getIdentity(), getNumChildShapes(), gim_inertia_add_transformed(), btGImpactShapeInterface::lockChildShapes(), m_childShapes, m_childTransforms, btGImpactShapeInterface::m_localAABB, btGImpactShapeInterface::unlockChildShapes(), and x2.
|
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().
|
inlinevirtual |
Implements btGImpactShapeInterface.
Definition at line 474 of file btGImpactShape.h.
|
inlinevirtual |
Implements btGImpactShapeInterface.
Definition at line 467 of file btGImpactShape.h.
|
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.
|
inlinevirtual |
Gets the children.
Implements btGImpactShapeInterface.
Definition at line 411 of file btGImpactShape.h.
References m_childShapes.
Referenced by btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box().
|
inlinevirtual |
Gets the children.
Implements btGImpactShapeInterface.
Definition at line 417 of file btGImpactShape.h.
References m_childShapes.
|
inlinevirtual |
Gets the children transform.
Implements btGImpactShapeInterface.
Definition at line 438 of file btGImpactShape.h.
References btAssert, m_childShapes, m_childTransforms, and btAlignedObjectArray< T >::size().
Referenced by btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box().
|
inline |
Obtains the compopund primitive manager.
Definition at line 384 of file btGImpactShape.h.
References m_primitive_manager.
|
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.
|
inlinevirtual |
Definition at line 484 of file btGImpactShape.h.
|
inlinevirtual |
Gets the number of children.
Implements btGImpactShapeInterface.
Definition at line 390 of file btGImpactShape.h.
References m_childShapes, and btAlignedObjectArray< T >::size().
Referenced by calculateLocalInertia(), and btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_count().
|
inlinevirtual |
Obtains the primitive manager.
Implements btGImpactShapeInterface.
Definition at line 378 of file btGImpactShape.h.
References m_primitive_manager.
|
inlinevirtual |
Determines if this shape has tetrahedrons.
Implements btGImpactShapeInterface.
Definition at line 462 of file btGImpactShape.h.
|
inlinevirtual |
Determines if this shape has triangles.
Implements btGImpactShapeInterface.
Definition at line 456 of file btGImpactShape.h.
|
inlinevirtual |
Sets the children transform.
Implements btGImpactShapeInterface.
Definition at line 448 of file btGImpactShape.h.
References btAssert, m_childShapes, m_childTransforms, btGImpactShapeInterface::postUpdate(), btAlignedObjectArray< T >::size(), and transform().
|
protected |
Definition at line 356 of file btGImpactShape.h.
Referenced by addChildShape(), calculateLocalInertia(), getChildAabb(), getChildShape(), getChildTransform(), getNumChildShapes(), and setChildTransform().
|
protected |
Definition at line 355 of file btGImpactShape.h.
Referenced by addChildShape(), calculateLocalInertia(), childrenHasTransform(), getChildAabb(), getChildTransform(), and setChildTransform().
|
protected |
Definition at line 354 of file btGImpactShape.h.
Referenced by btGImpactCompoundShape(), getCompoundPrimitiveManager(), and getPrimitiveManager().