76#define CALC_EXACT_INERTIA 1
81#ifdef CALC_EXACT_INERTIA
82 inertia.setValue(0.f, 0.f, 0.f);
123#ifdef CALC_EXACT_INERTIA
124 inertia.setValue(0.f, 0.f, 0.f);
158#ifdef CALC_EXACT_INERTIA
159 inertia.setValue(0.f, 0.f, 0.f);
278 return "btGImpactMeshShapeData";
btVector3 gim_get_point_inertia(const btVector3 &point, btScalar mass)
btVector3 gim_inertia_add_transformed(const btVector3 &source_inertia, const btVector3 &added_inertia, const btTransform &transform)
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...
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int size() const
return the number of elements in the array
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar m_collisionMargin
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
Calculates the exact inertia tensor for this shape.
btAlignedObjectArray< btTransform > m_childTransforms
btAlignedObjectArray< btCollisionShape * > m_childShapes
virtual bool childrenHasTransform() const
if true, then its children must get transforms.
virtual int getNumChildShapes() const
Gets the number of children.
Trimesh primitive manager.
btStridingMeshInterface * m_meshInterface
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles.
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles.
void getVertex(int vertex_index, btVector3 &vertex) const
TrimeshPrimitiveManager m_primitive_manager
int getVertexCount() const
virtual void lockChildShapes() const
call when reading child shapes
virtual ~btGImpactMeshShapePart()
virtual void unlockChildShapes() const
int getMeshPartCount() const
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
virtual method for ray collision
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
btGImpactMeshShapePart * getMeshPart(int index)
btStridingMeshInterface * m_meshInterface
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles.
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles.
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
Subshape member functions.
btAlignedObjectArray< btGImpactMeshShapePart * > m_mesh_parts
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
bool rayQuery(const btVector3 &ray_dir, const btVector3 &ray_origin, btAlignedObjectArray< int > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
btPrimitiveManagerBase * getPrimitiveManager() const
bool boxQuery(const btAABB &box, btAlignedObjectArray< int > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
void setPrimitiveManager(btPrimitiveManagerBase *primitive_manager)
void getPrimitiveTriangle(int index, btPrimitiveTriangle &triangle) const
if this trimesh
virtual void lockChildShapes() const
call when reading child shapes
btGImpactBoxSet m_box_set
virtual void unlockChildShapes() const
The btStridingMeshInterface is the interface class for high performance generic access to triangle me...
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)=0
btVector3 can be used to represent 3D points and vectors.
void serializeFloat(struct btVector3FloatData &dataOut) const
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
RayResultCallback is used to report new raycast results.
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64