Blender V2.61 - r43446
|
Base class for gimpact shapes. More...
#include <btGImpactShape.h>
Public Member Functions | |
btGImpactShapeInterface () | |
SIMD_FORCE_INLINE void | updateBound () |
performs refit operation | |
void | getAabb (const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const |
If the Bounding box is not updated, then this class attemps to calculate it. | |
virtual void | postUpdate () |
Tells to this object that is needed to refit the box set. | |
SIMD_FORCE_INLINE const btAABB & | getLocalBox () |
Obtains the local box, which is the global calculated box of the total of subshapes. | |
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 | |
virtual void | processAllTriangles (btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const |
Function for retrieve triangles. | |
virtual eGIMPACT_SHAPE_TYPE | getGImpactShapeType () const =0 |
Base method for determinig which kind of GIMPACT shape we get. | |
SIMD_FORCE_INLINE btGImpactBoxSet * | getBoxSet () |
gets boxset | |
SIMD_FORCE_INLINE bool | hasBoxSet () const |
Determines if this class has a hierarchy structure for sorting its primitives. | |
virtual const btPrimitiveManagerBase * | getPrimitiveManager () const =0 |
Obtains the primitive manager. | |
virtual int | getNumChildShapes () const =0 |
Gets the number of children. | |
virtual bool | childrenHasTransform () const =0 |
if true, then its children must get transforms. | |
virtual bool | needsRetrieveTriangles () const =0 |
Determines if this shape has triangles. | |
virtual bool | needsRetrieveTetrahedrons () const =0 |
Determines if this shape has tetrahedrons. | |
virtual void | getBulletTriangle (int prim_index, btTriangleShapeEx &triangle) const =0 |
Base method for determinig which kind of GIMPACT shape we get. | |
virtual void | getBulletTetrahedron (int prim_index, btTetrahedronShapeEx &tetrahedron) const =0 |
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. | |
SIMD_FORCE_INLINE void | getPrimitiveTriangle (int index, btPrimitiveTriangle &triangle) const |
if this trimesh | |
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)=0 |
Gets the children. | |
virtual const btCollisionShape * | getChildShape (int index) const =0 |
Gets the child. | |
virtual btTransform | getChildTransform (int index) const =0 |
Gets the children transform. | |
virtual void | setChildTransform (int index, const btTransform &transform)=0 |
Sets the children transform. | |
Protected Member Functions | |
virtual void | calcLocalAABB () |
Protected Attributes | |
btAABB | m_localAABB |
bool | m_needs_update |
btVector3 | localScaling |
btGImpactBoxSet | m_box_set |
Base class for gimpact shapes.
Definition at line 78 of file btGImpactShape.h.
btGImpactShapeInterface::btGImpactShapeInterface | ( | ) | [inline] |
Definition at line 106 of file btGImpactShape.h.
References GIMPACT_SHAPE_PROXYTYPE, localScaling, m_localAABB, m_needs_update, and btCollisionShape::m_shapeType.
virtual void btGImpactShapeInterface::calcLocalAABB | ( | ) | [inline, protected, virtual] |
use this function for perfofm refit in bounding boxes use this function for perfofm refit in bounding boxes
Reimplemented in btGImpactMeshShape.
Definition at line 88 of file btGImpactShape.h.
References btGImpactQuantizedBvh::buildSet(), btGImpactQuantizedBvh::getGlobalBox(), btGImpactQuantizedBvh::getNodeCount(), lockChildShapes(), m_box_set, m_localAABB, unlockChildShapes(), and btGImpactQuantizedBvh::update().
Referenced by updateBound().
virtual bool btGImpactShapeInterface::childrenHasTransform | ( | ) | const [pure virtual] |
if true, then its children must get transforms.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
void btGImpactShapeInterface::getAabb | ( | const btTransform & | t, |
btVector3 & | aabbMin, | ||
btVector3 & | aabbMax | ||
) | const [inline, virtual] |
If the Bounding box is not updated, then this class attemps to calculate it.
Implements btCollisionShape.
Definition at line 133 of file btGImpactShape.h.
References m_localAABB.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_concave(), and btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_plane_collision().
SIMD_FORCE_INLINE btGImpactBoxSet* btGImpactShapeInterface::getBoxSet | ( | ) | [inline] |
gets boxset
Definition at line 195 of file btGImpactShape.h.
References m_box_set.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(), and btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs().
virtual void btGImpactShapeInterface::getBulletTetrahedron | ( | int | prim_index, |
btTetrahedronShapeEx & | tetrahedron | ||
) | const [pure virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by GIM_ShapeRetriever::TetraShapeRetriever::getChildShape().
virtual void btGImpactShapeInterface::getBulletTriangle | ( | int | prim_index, |
btTriangleShapeEx & | triangle | ||
) | const [pure virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by GIM_ShapeRetriever::TriangleShapeRetriever::getChildShape().
virtual void btGImpactShapeInterface::getChildAabb | ( | int | child_index, |
const btTransform & | t, | ||
btVector3 & | aabbMin, | ||
btVector3 & | aabbMax | ||
) | const [inline, virtual] |
Retrieves the bound from a child.
Reimplemented in btGImpactCompoundShape, and btGImpactMeshShape.
Definition at line 248 of file btGImpactShape.h.
References btPrimitiveManagerBase::get_primitive_box(), and getPrimitiveManager().
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(), and btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs().
virtual btCollisionShape* btGImpactShapeInterface::getChildShape | ( | int | index | ) | [pure virtual] |
Gets the children.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by GIM_ShapeRetriever::ChildShapeRetriever::getChildShape(), and setMargin().
virtual const btCollisionShape* btGImpactShapeInterface::getChildShape | ( | int | index | ) | const [pure virtual] |
Gets the child.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
virtual btTransform btGImpactShapeInterface::getChildTransform | ( | int | index | ) | const [pure virtual] |
Gets the children transform.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
virtual eGIMPACT_SHAPE_TYPE btGImpactShapeInterface::getGImpactShapeType | ( | ) | const [pure virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
SIMD_FORCE_INLINE const btAABB& btGImpactShapeInterface::getLocalBox | ( | ) | [inline] |
Obtains the local box, which is the global calculated box of the total of subshapes.
Definition at line 148 of file btGImpactShape.h.
References m_localAABB.
Referenced by btGImpactMeshShape::calcLocalAABB().
virtual const btVector3& btGImpactShapeInterface::getLocalScaling | ( | ) | const [inline, virtual] |
Implements btCollisionShape.
Reimplemented in btGImpactMeshShapePart.
Definition at line 168 of file btGImpactShape.h.
References localScaling.
virtual int btGImpactShapeInterface::getNumChildShapes | ( | ) | const [pure virtual] |
Gets the number of children.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(), btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs(), and setMargin().
virtual const btPrimitiveManagerBase* btGImpactShapeInterface::getPrimitiveManager | ( | ) | const [pure virtual] |
Obtains the primitive manager.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by getChildAabb(), and getPrimitiveTriangle().
SIMD_FORCE_INLINE void btGImpactShapeInterface::getPrimitiveTriangle | ( | int | index, |
btPrimitiveTriangle & | triangle | ||
) | const [inline] |
if this trimesh
Definition at line 239 of file btGImpactShape.h.
References btPrimitiveManagerBase::get_primitive_triangle(), and getPrimitiveManager().
Referenced by btGImpactCollisionAlgorithm::collide_sat_triangles(), and btGImpactMeshShapePart::processAllTriangles().
virtual int btGImpactShapeInterface::getShapeType | ( | ) | const [inline, virtual] |
Reimplemented from btCollisionShape.
Definition at line 154 of file btGImpactShape.h.
References GIMPACT_SHAPE_PROXYTYPE.
SIMD_FORCE_INLINE bool btGImpactShapeInterface::hasBoxSet | ( | ) | const [inline] |
Determines if this class has a hierarchy structure for sorting its primitives.
Definition at line 201 of file btGImpactShape.h.
References btGImpactQuantizedBvh::getNodeCount(), and m_box_set.
Referenced by btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(), and btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs().
virtual void btGImpactShapeInterface::lockChildShapes | ( | ) | const [inline, virtual] |
call when reading child shapes
Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.
Definition at line 230 of file btGImpactShape.h.
Referenced by calcLocalAABB(), btGImpactCompoundShape::calculateLocalInertia(), btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
virtual bool btGImpactShapeInterface::needsRetrieveTetrahedrons | ( | ) | const [pure virtual] |
Determines if this shape has tetrahedrons.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by GIM_ShapeRetriever::GIM_ShapeRetriever().
virtual bool btGImpactShapeInterface::needsRetrieveTriangles | ( | ) | const [pure virtual] |
Determines if this shape has triangles.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
Referenced by GIM_ShapeRetriever::GIM_ShapeRetriever().
virtual void btGImpactShapeInterface::postUpdate | ( | ) | [inline, virtual] |
Tells to this object that is needed to refit the box set.
Reimplemented in btGImpactMeshShape.
Definition at line 142 of file btGImpactShape.h.
References m_needs_update.
Referenced by btGImpactMeshShape::postUpdate(), btGImpactCompoundShape::setChildTransform(), setLocalScaling(), btGImpactMeshShapePart::setLocalScaling(), and btGImpactMeshShapePart::setMargin().
virtual void btGImpactShapeInterface::processAllTriangles | ( | btTriangleCallback * | callback, |
const btVector3 & | aabbMin, | ||
const btVector3 & | aabbMax | ||
) | const [inline, virtual] |
Function for retrieve triangles.
It gives the triangles in local space
Implements btConcaveShape.
Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.
Definition at line 286 of file btGImpactShape.h.
virtual void btGImpactShapeInterface::rayTest | ( | const btVector3 & | rayFrom, |
const btVector3 & | rayTo, | ||
btCollisionWorld::RayResultCallback & | resultCallback | ||
) | const [inline, virtual] |
virtual method for ray collision
Reimplemented in btGImpactMeshShape.
Definition at line 277 of file btGImpactShape.h.
virtual void btGImpactShapeInterface::setChildTransform | ( | int | index, |
const btTransform & | transform | ||
) | [pure virtual] |
Sets the children transform.
Implemented in btGImpactCompoundShape, btGImpactMeshShapePart, and btGImpactMeshShape.
virtual void btGImpactShapeInterface::setLocalScaling | ( | const btVector3 & | scaling | ) | [inline, virtual] |
Implements btCollisionShape.
Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.
Definition at line 162 of file btGImpactShape.h.
References localScaling, and postUpdate().
virtual void btGImpactShapeInterface::setMargin | ( | btScalar | margin | ) | [inline, virtual] |
Reimplemented from btConcaveShape.
Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.
Definition at line 174 of file btGImpactShape.h.
References getChildShape(), getNumChildShapes(), i, btConcaveShape::m_collisionMargin, m_needs_update, and btCollisionShape::setMargin().
virtual void btGImpactShapeInterface::unlockChildShapes | ( | ) | const [inline, virtual] |
Base method for determinig which kind of GIMPACT shape we get.
Subshape member functions
Reimplemented in btGImpactMeshShapePart, and btGImpactMeshShape.
Definition at line 234 of file btGImpactShape.h.
Referenced by calcLocalAABB(), btGImpactCompoundShape::calculateLocalInertia(), btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), and btGImpactCollisionAlgorithm::gimpact_vs_shape().
SIMD_FORCE_INLINE void btGImpactShapeInterface::updateBound | ( | ) | [inline] |
performs refit operation
Updates the entire Box set of this shape.
Definition at line 122 of file btGImpactShape.h.
References calcLocalAABB(), and m_needs_update.
Referenced by CcdShapeConstructionInfo::CreateBulletShape().
btVector3 btGImpactShapeInterface::localScaling [protected] |
Definition at line 83 of file btGImpactShape.h.
Referenced by btGImpactShapeInterface(), getLocalScaling(), btGImpactMeshShape::serialize(), btGImpactMeshShape::setLocalScaling(), and setLocalScaling().
btGImpactBoxSet btGImpactShapeInterface::m_box_set [protected] |
Definition at line 84 of file btGImpactShape.h.
Referenced by btGImpactCompoundShape::btGImpactCompoundShape(), btGImpactMeshShapePart::btGImpactMeshShapePart(), calcLocalAABB(), getBoxSet(), hasBoxSet(), btGImpactMeshShapePart::lockChildShapes(), btGImpactMeshShapePart::processAllTriangles(), and btGImpactMeshShapePart::unlockChildShapes().
btAABB btGImpactShapeInterface::m_localAABB [protected] |
Definition at line 81 of file btGImpactShape.h.
Referenced by btGImpactShapeInterface(), btGImpactMeshShape::calcLocalAABB(), calcLocalAABB(), btGImpactMeshShape::calculateLocalInertia(), btGImpactMeshShapePart::calculateLocalInertia(), btGImpactCompoundShape::calculateLocalInertia(), getAabb(), and getLocalBox().
bool btGImpactShapeInterface::m_needs_update [protected] |
Definition at line 82 of file btGImpactShape.h.
Referenced by btGImpactShapeInterface(), postUpdate(), btGImpactMeshShape::postUpdate(), btGImpactMeshShape::setLocalScaling(), setMargin(), btGImpactMeshShape::setMargin(), and updateBound().