Bullet Collision Detection & Physics Library
|
The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good as btConvexHullShape. More...
#include <btConvexTriangleMeshShape.h>
Private Attributes | |
class btStridingMeshInterface * | m_stridingMesh |
Additional Inherited Members | |
![]() | |
void | setCachedLocalAabb (const btVector3 &aabbMin, const btVector3 &aabbMax) |
void | getCachedLocalAabb (btVector3 &aabbMin, btVector3 &aabbMax) const |
btPolyhedralConvexAabbCachingShape () | |
![]() | |
btConvexInternalShape () | |
![]() | |
btConvexPolyhedron * | m_polyhedron |
![]() | |
btVector3 | m_localScaling |
btVector3 | m_implicitShapeDimensions |
btScalar | m_collisionMargin |
btScalar | m_padding |
![]() | |
int | m_shapeType |
void * | m_userPointer |
int | m_userIndex |
int | m_userIndex2 |
The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good as btConvexHullShape.
A small benefit of this class is that it uses the btStridingMeshInterface, so you can avoid the duplication of the triangle mesh data. Nevertheless, most users should use the much better performing btConvexHullShape instead.
Definition at line 23 of file btConvexTriangleMeshShape.h.
btConvexTriangleMeshShape::btConvexTriangleMeshShape | ( | btStridingMeshInterface * | meshInterface, |
bool | calcAabb = true |
||
) |
Definition at line 22 of file btConvexTriangleMeshShape.cpp.
|
virtual |
Reimplemented from btPolyhedralConvexShape.
Definition at line 93 of file btConvexTriangleMeshShape.cpp.
btConvexTriangleMeshShape::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
void btConvexTriangleMeshShape::calculatePrincipalAxisTransform | ( | btTransform & | principal, |
btVector3 & | inertia, | ||
btScalar & | volume | ||
) | const |
computes the exact moment of inertia and the transform from the coordinate system defined by the principal axes of the moment of inertia and the center of mass to the current coordinate system.
A mass of 1 is assumed, for other masses just multiply the computed "inertia" by the mass. The resulting transform "principal" has to be applied inversely to the mesh in order for the local coordinate system of the shape to be centered at the center of mass and to coincide with the principal axes. This also necessitates a correction of the world transform of the collision object by the principal transform. This method also computes the volume of the convex mesh.
Definition at line 184 of file btConvexTriangleMeshShape.cpp.
Implements btPolyhedralConvexShape.
Definition at line 145 of file btConvexTriangleMeshShape.cpp.
Reimplemented from btConvexInternalShape.
Definition at line 179 of file btConvexTriangleMeshShape.cpp.
|
inline |
Definition at line 33 of file btConvexTriangleMeshShape.h.
|
inline |
Definition at line 37 of file btConvexTriangleMeshShape.h.
Implements btCollisionShape.
Definition at line 47 of file btConvexTriangleMeshShape.h.
|
virtual |
Implements btPolyhedralConvexShape.
Definition at line 140 of file btConvexTriangleMeshShape.cpp.
|
virtual |
Implements btPolyhedralConvexShape.
Definition at line 155 of file btConvexTriangleMeshShape.cpp.
|
virtual |
Implements btPolyhedralConvexShape.
Definition at line 134 of file btConvexTriangleMeshShape.cpp.
|
virtual |
Implements btPolyhedralConvexShape.
Definition at line 160 of file btConvexTriangleMeshShape.cpp.
Implements btPolyhedralConvexShape.
Definition at line 150 of file btConvexTriangleMeshShape.cpp.
Implements btPolyhedralConvexShape.
Definition at line 166 of file btConvexTriangleMeshShape.cpp.
|
virtual |
Reimplemented from btConvexInternalShape.
Definition at line 115 of file btConvexTriangleMeshShape.cpp.
|
virtual |
Reimplemented from btPolyhedralConvexShape.
Definition at line 69 of file btConvexTriangleMeshShape.cpp.
Reimplemented from btPolyhedralConvexAabbCachingShape.
Definition at line 172 of file btConvexTriangleMeshShape.cpp.
|
private |
Definition at line 26 of file btConvexTriangleMeshShape.h.