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);
75 if (
cb.m_hitFraction < 1)
77 rayTo.setInterpolate3(
cb.m_from,
cb.m_to,
cb.m_hitFraction);
btCompoundShape * btCreateCompoundFromGimpactShape(const btGImpactMeshShape *gimpactMesh, btScalar depth)
const T & btMax(const T &a, const T &b)
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.
virtual const btVector3 & getLocalScaling() const
btVector3 can be used to represent 3D points and vectors.
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