79 #define CALC_EXACT_INERTIA 1    85 #ifdef CALC_EXACT_INERTIA    94                 m_childShapes[i]->calculateLocalInertia(shapemass,temp_inertia);
   118         inertia = scaledmass * (
btVector3(y2+z2,x2+z2,x2+y2));
   131 #ifdef CALC_EXACT_INERTIA   142                 inertia+=pointintertia;
   157         inertia = scaledmass * (
btVector3(y2+z2,x2+z2,x2+y2));
   167 #ifdef CALC_EXACT_INERTIA   170         int i = this->getMeshPartCount();
   176                 getMeshPart(i)->calculateLocalInertia(partmass,partinertia);
   177                 inertia+=partinertia;
   192         inertia = scaledmass * (
btVector3(y2+z2,x2+z2,x2+y2));
   210         if(collided.
size()==0)
   218         int i = collided.
size();
   237         if(collided.
size()==0)
   245         int i = collided.
size();
   257         int i = m_mesh_parts.size();
   260                 m_mesh_parts[i]->processAllTriangles(callback,aabbMin,aabbMax);
   266         int i = m_mesh_parts.size();
   269                 m_mesh_parts[i]->processAllTrianglesRay(callback, rayFrom, rayTo);
   289         return "btGImpactMeshShapeData";
 
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
Subshape member functions. 
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles. 
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
int getVertexCount() const
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)=0
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles. 
btScalar m_collisionMargin
void serializeFloat(struct btVector3FloatData &dataOut) const
RayResultCallback is used to report new raycast results. 
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles. 
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure) 
virtual void unlockChildShapes() const
btGImpactBoxSet m_box_set
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1. 
bool boxQuery(const btAABB &box, btAlignedObjectArray< int > &collided_results) const
returns the indices of the primitives in the m_primitive_manager 
void getVertex(int vertex_index, btVector3 &vertex) const
virtual ~btGImpactMeshShapePart()
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles. 
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
btVector3 gim_inertia_add_transformed(const btVector3 &source_inertia, const btVector3 &added_inertia, const btTransform &transform)
btStridingMeshInterfaceData m_meshInterface
TrimeshPrimitiveManager m_primitive_manager
void setPrimitiveManager(btPrimitiveManagerBase *primitive_manager)
virtual bool childrenHasTransform() const
if true, then its children must get transforms. 
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
virtual int getNumChildShapes() const
Gets the number of children. 
Trimesh primitive manager. 
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
virtual method for ray collision 
btCollisionShapeData m_collisionShapeData
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure) 
btVector3 can be used to represent 3D points and vectors. 
int size() const
return the number of elements in the array 
The btStridingMeshInterface is the interface class for high performance generic access to triangle me...
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
void getPrimitiveTriangle(int index, btPrimitiveTriangle &triangle) const
if this trimesh 
btVector3 gim_get_point_inertia(const btVector3 &point, btScalar mass)
btVector3FloatData m_localScaling
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
virtual void lockChildShapes() const
call when reading child shapes 
btStridingMeshInterface * m_meshInterface
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
Calculates the exact inertia tensor for this shape.