1#ifndef BT_COMPOUND_FROM_GIMPACT
2#define BT_COMPOUND_FROM_GIMPACT
17 for (
int i = 0; i < m_children.size(); i++)
19 delete m_children[i].m_childShape;
67 btVector3 normal = (v1 - v0).cross(v2 - v0);
72 MyCallback cb(rayFrom, rayTo, partId, triangleIndex);
99 gimpactMesh->
getAabb(tr, aabbMin, aabbMax);
btCompoundShape * btCreateCompoundFromGimpactShape(const btGImpactMeshShape *gimpactMesh, btScalar depth)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
The btBU_Simplex1to4 implements tetrahedron, triangle, line, vertex collision shapes....
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual ~btCompoundFromGimpactShape()
The btCompoundShape allows to store multiple other btCollisionShapes This allows for moving concave c...
void addChildShape(const btTransform &localTransform, btCollisionShape *shape)
This class manages a mesh supplied by the btStridingMeshInterface interface.
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles.
btStridingMeshInterface * getMeshInterface()
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 const btVector3 & getLocalScaling() const
virtual void InternalProcessAllTriangles(btInternalTriangleIndexCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
btVector3 can be used to represent 3D points and vectors.
void setInterpolate3(const btVector3 &v0, const btVector3 &v1, btScalar rt)
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
int m_ignoreTriangleIndex
virtual btScalar reportHit(const btVector3 &hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex)
MyCallback(const btVector3 &from, const btVector3 &to, int ignorePart, int ignoreTriangleIndex)
const btGImpactMeshShape * m_gimpactShape
MyInternalTriangleIndexCallback(btCompoundShape *colShape, const btGImpactMeshShape *meshShape, btScalar depth)
virtual void internalProcessTriangleIndex(btVector3 *triangle, int partId, int triangleIndex)
btCompoundShape * m_colShape