Blender V2.61 - r43446
|
This class manages a mesh supplied by the btStridingMeshInterface interface. More...
#include <btGImpactShape.h>
Public Member Functions | |
btGImpactMeshShape (btStridingMeshInterface *meshInterface) | |
virtual | ~btGImpactMeshShape () |
btStridingMeshInterface * | getMeshInterface () |
const btStridingMeshInterface * | getMeshInterface () const |
int | getMeshPartCount () const |
btGImpactMeshShapePart * | getMeshPart (int index) |
const btGImpactMeshShapePart * | getMeshPart (int index) const |
virtual void | setLocalScaling (const btVector3 &scaling) |
virtual void | setMargin (btScalar margin) |
virtual void | postUpdate () |
Tells to this object that is needed to refit all the meshes. | |
virtual void | calculateLocalInertia (btScalar mass, btVector3 &inertia) const |
virtual const btPrimitiveManagerBase * | getPrimitiveManager () const |
Obtains the primitive manager. | |
virtual int | getNumChildShapes () const |
Gets the number of children. | |
virtual bool | childrenHasTransform () const |
if true, then its children must get transforms. | |
virtual bool | needsRetrieveTriangles () const |
Determines if this shape has triangles. | |
virtual bool | needsRetrieveTetrahedrons () const |
Determines if this shape has tetrahedrons. | |
virtual void | getBulletTriangle (int prim_index, btTriangleShapeEx &triangle) const |
Base method for determinig which kind of GIMPACT shape we get. | |
virtual void | getBulletTetrahedron (int prim_index, btTetrahedronShapeEx &tetrahedron) const |
Base method for determinig which kind of GIMPACT shape we get. | |
virtual void | lockChildShapes () const |
call when reading child shapes | |
virtual void | unlockChildShapes () const |
Base method for determinig which kind of GIMPACT shape we get. | |
virtual void | getChildAabb (int child_index, const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const |
Retrieves the bound from a child. | |
virtual btCollisionShape * | getChildShape (int index) |
Gets the children. | |
virtual const btCollisionShape * | getChildShape (int index) const |
Gets the child. | |
virtual btTransform | getChildTransform (int index) const |
Gets the children transform. | |
virtual void | setChildTransform (int index, const btTransform &transform) |
Sets the children transform. | |
virtual eGIMPACT_SHAPE_TYPE | getGImpactShapeType () const |
Base method for determinig which kind of GIMPACT shape we get. | |
virtual const char * | getName () const |
virtual void | rayTest (const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const |
virtual method for ray collision | |
virtual void | processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const |
Function for retrieve triangles. | |
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) | |
Protected Member Functions | |
void | buildMeshParts (btStridingMeshInterface *meshInterface) |
virtual void | calcLocalAABB () |
use this function for perfofm refit in bounding boxes | |
Protected Attributes | |
btAlignedObjectArray < btGImpactMeshShapePart * > | m_mesh_parts |
This class manages a mesh supplied by the btStridingMeshInterface interface.
Set of btGImpactMeshShapePart parts
Definition at line 899 of file btGImpactShape.h.
btGImpactMeshShape::btGImpactMeshShape | ( | btStridingMeshInterface * | meshInterface | ) | [inline] |
Definition at line 927 of file btGImpactShape.h.
References buildMeshParts().
virtual btGImpactMeshShape::~btGImpactMeshShape | ( | ) | [inline, virtual] |
Definition at line 933 of file btGImpactShape.h.
References btAlignedObjectArray< T >::clear(), i, m_mesh_parts, and btAlignedObjectArray< T >::size().
void btGImpactMeshShape::buildMeshParts | ( | btStridingMeshInterface * | meshInterface | ) | [inline, protected] |
Definition at line 905 of file btGImpactShape.h.
References btStridingMeshInterface::getNumSubParts(), i, m_mesh_parts, and btAlignedObjectArray< T >::push_back().
Referenced by btGImpactMeshShape().
virtual void btGImpactMeshShape::calcLocalAABB | ( | ) | [inline, protected, virtual] |
use this function for perfofm refit in bounding boxes
Reimplemented from btGImpactShapeInterface.
Definition at line 915 of file btGImpactShape.h.
References btGImpactShapeInterface::getLocalBox(), i, btGImpactShapeInterface::m_localAABB, m_mesh_parts, and btAlignedObjectArray< T >::size().
void btGImpactMeshShape::calculateLocalInertia | ( | btScalar | mass, |
btVector3 & | inertia | ||
) | const [virtual] |
Implements btCollisionShape.
Definition at line 110 of file btGImpactShape.cpp.
References btGImpactMeshShapePart::calculateLocalInertia(), getMeshPart(), getMeshPartCount(), i, and btGImpactShapeInterface::m_localAABB.
SIMD_FORCE_INLINE int btGImpactMeshShape::calculateSerializeBufferSize | ( | ) | const [virtual] |
Reimplemented from btCollisionShape.
Definition at line 1165 of file btGImpactShape.h.
virtual bool btGImpactMeshShape::childrenHasTransform | ( | ) | const [inline, virtual] |
if true, then its children must get transforms.
Implements btGImpactShapeInterface.
Definition at line 1034 of file btGImpactShape.h.
References btAssert.
virtual void btGImpactMeshShape::getBulletTetrahedron | ( | int | prim_index, |
btTetrahedronShapeEx & | tetrahedron | ||
) | const [inline, virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Implements btGImpactShapeInterface.
Definition at line 1060 of file btGImpactShape.h.
References btAssert.
virtual void btGImpactMeshShape::getBulletTriangle | ( | int | prim_index, |
btTriangleShapeEx & | triangle | ||
) | const [inline, virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Implements btGImpactShapeInterface.
Definition at line 1054 of file btGImpactShape.h.
References btAssert.
virtual void btGImpactMeshShape::getChildAabb | ( | int | child_index, |
const btTransform & | t, | ||
btVector3 & | aabbMin, | ||
btVector3 & | aabbMax | ||
) | const [inline, virtual] |
Retrieves the bound from a child.
Reimplemented from btGImpactShapeInterface.
Definition at line 1083 of file btGImpactShape.h.
References btAssert.
virtual btCollisionShape* btGImpactMeshShape::getChildShape | ( | int | index | ) | [inline, virtual] |
Gets the children.
Implements btGImpactShapeInterface.
Definition at line 1090 of file btGImpactShape.h.
virtual const btCollisionShape* btGImpactMeshShape::getChildShape | ( | int | index | ) | const [inline, virtual] |
Gets the child.
Implements btGImpactShapeInterface.
Definition at line 1099 of file btGImpactShape.h.
virtual btTransform btGImpactMeshShape::getChildTransform | ( | int | index | ) | const [inline, virtual] |
Gets the children transform.
Implements btGImpactShapeInterface.
Definition at line 1107 of file btGImpactShape.h.
References btAssert.
virtual eGIMPACT_SHAPE_TYPE btGImpactMeshShape::getGImpactShapeType | ( | ) | const [inline, virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Implements btGImpactShapeInterface.
Definition at line 1125 of file btGImpactShape.h.
References CONST_GIMPACT_TRIMESH_SHAPE.
Referenced by serialize().
const btStridingMeshInterface* btGImpactMeshShape::getMeshInterface | ( | ) | const [inline] |
Definition at line 950 of file btGImpactShape.h.
btStridingMeshInterface* btGImpactMeshShape::getMeshInterface | ( | ) | [inline] |
Definition at line 945 of file btGImpactShape.h.
btGImpactMeshShapePart* btGImpactMeshShape::getMeshPart | ( | int | index | ) | [inline] |
Definition at line 960 of file btGImpactShape.h.
References m_mesh_parts.
Referenced by calculateLocalInertia(), btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
const btGImpactMeshShapePart* btGImpactMeshShape::getMeshPart | ( | int | index | ) | const [inline] |
Definition at line 967 of file btGImpactShape.h.
References m_mesh_parts.
int btGImpactMeshShape::getMeshPartCount | ( | ) | const [inline] |
Definition at line 955 of file btGImpactShape.h.
References m_mesh_parts, and btAlignedObjectArray< T >::size().
Referenced by calculateLocalInertia(), btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
virtual const char* btGImpactMeshShape::getName | ( | void | ) | const [inline, virtual] |
Implements btCollisionShape.
Definition at line 1131 of file btGImpactShape.h.
virtual int btGImpactMeshShape::getNumChildShapes | ( | ) | const [inline, virtual] |
Gets the number of children.
Implements btGImpactShapeInterface.
Definition at line 1026 of file btGImpactShape.h.
References btAssert.
virtual const btPrimitiveManagerBase* btGImpactMeshShape::getPrimitiveManager | ( | ) | const [inline, virtual] |
Obtains the primitive manager.
Implements btGImpactShapeInterface.
Definition at line 1018 of file btGImpactShape.h.
virtual void btGImpactMeshShape::lockChildShapes | ( | ) | const [inline, virtual] |
call when reading child shapes
Reimplemented from btGImpactShapeInterface.
Definition at line 1067 of file btGImpactShape.h.
References btAssert.
virtual bool btGImpactMeshShape::needsRetrieveTetrahedrons | ( | ) | const [inline, virtual] |
Determines if this shape has tetrahedrons.
Implements btGImpactShapeInterface.
Definition at line 1048 of file btGImpactShape.h.
References btAssert.
virtual bool btGImpactMeshShape::needsRetrieveTriangles | ( | ) | const [inline, virtual] |
Determines if this shape has triangles.
Implements btGImpactShapeInterface.
Definition at line 1041 of file btGImpactShape.h.
References btAssert.
virtual void btGImpactMeshShape::postUpdate | ( | ) | [inline, virtual] |
Tells to this object that is needed to refit all the meshes.
Reimplemented from btGImpactShapeInterface.
Definition at line 1002 of file btGImpactShape.h.
References i, m_mesh_parts, btGImpactShapeInterface::m_needs_update, btGImpactShapeInterface::postUpdate(), and btAlignedObjectArray< T >::size().
void btGImpactMeshShape::processAllTriangles | ( | btTriangleCallback * | callback, |
const btVector3 & | aabbMin, | ||
const btVector3 & | aabbMax | ||
) | const [virtual] |
Function for retrieve triangles.
It gives the triangles in local space
Reimplemented from btGImpactShapeInterface.
Definition at line 176 of file btGImpactShape.cpp.
References i, m_mesh_parts, and btAlignedObjectArray< T >::size().
void btGImpactMeshShape::rayTest | ( | const btVector3 & | rayFrom, |
const btVector3 & | rayTo, | ||
btCollisionWorld::RayResultCallback & | resultCallback | ||
) | const [virtual] |
virtual method for ray collision
Reimplemented from btGImpactShapeInterface.
Definition at line 143 of file btGImpactShape.cpp.
const char * btGImpactMeshShape::serialize | ( | void * | dataBuffer, |
btSerializer * | serializer | ||
) | const [virtual] |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented from btCollisionShape.
Definition at line 187 of file btGImpactShape.cpp.
References getGImpactShapeType(), btGImpactShapeInterface::localScaling, btConcaveShape::m_collisionMargin, btGImpactMeshShapeData::m_collisionMargin, btGImpactMeshShapeData::m_collisionShapeData, btGImpactMeshShapeData::m_gimpactSubType, btGImpactMeshShapeData::m_localScaling, btGImpactMeshShapeData::m_meshInterface, and btStridingMeshInterface::serialize().
virtual void btGImpactMeshShape::setChildTransform | ( | int | index, |
const btTransform & | transform | ||
) | [inline, virtual] |
Sets the children transform.
Implements btGImpactShapeInterface.
Definition at line 1118 of file btGImpactShape.h.
References btAssert.
virtual void btGImpactMeshShape::setLocalScaling | ( | const btVector3 & | scaling | ) | [inline, virtual] |
Reimplemented from btGImpactShapeInterface.
Definition at line 973 of file btGImpactShape.h.
References i, btGImpactShapeInterface::localScaling, m_mesh_parts, btGImpactShapeInterface::m_needs_update, btGImpactMeshShapePart::setLocalScaling(), and btAlignedObjectArray< T >::size().
virtual void btGImpactMeshShape::setMargin | ( | btScalar | margin | ) | [inline, virtual] |
Reimplemented from btGImpactShapeInterface.
Definition at line 987 of file btGImpactShape.h.
References i, btConcaveShape::m_collisionMargin, m_mesh_parts, btGImpactShapeInterface::m_needs_update, btGImpactMeshShapePart::setMargin(), and btAlignedObjectArray< T >::size().
Referenced by CcdShapeConstructionInfo::CreateBulletShape().
virtual void btGImpactMeshShape::unlockChildShapes | ( | ) | const [inline, virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Reimplemented from btGImpactShapeInterface.
Definition at line 1072 of file btGImpactShape.h.
References btAssert.
Definition at line 904 of file btGImpactShape.h.
Referenced by buildMeshParts(), calcLocalAABB(), getMeshPart(), getMeshPartCount(), postUpdate(), processAllTriangles(), setLocalScaling(), setMargin(), and ~btGImpactMeshShape().