19 : m_localScaling(localScaling), m_bvhTriMeshShape(childShape)
59 scaledAabbMin[0] =
m_localScaling.
getX() >= 0. ? aabbMin[0] * invLocalScaling[0] : aabbMax[0] * invLocalScaling[0];
60 scaledAabbMin[1] =
m_localScaling.
getY() >= 0. ? aabbMin[1] * invLocalScaling[1] : aabbMax[1] * invLocalScaling[1];
61 scaledAabbMin[2] =
m_localScaling.
getZ() >= 0. ? aabbMin[2] * invLocalScaling[2] : aabbMax[2] * invLocalScaling[2];
62 scaledAabbMin[3] = 0.f;
64 scaledAabbMax[0] =
m_localScaling.
getX() <= 0. ? aabbMin[0] * invLocalScaling[0] : aabbMax[0] * invLocalScaling[0];
65 scaledAabbMax[1] =
m_localScaling.
getY() <= 0. ? aabbMin[1] * invLocalScaling[1] : aabbMax[1] * invLocalScaling[1];
66 scaledAabbMax[2] =
m_localScaling.
getZ() <= 0. ? aabbMin[2] * invLocalScaling[2] : aabbMax[2] * invLocalScaling[2];
67 scaledAabbMax[3] = 0.f;
80 localAabbMin[0] = (
m_localScaling.
getX() >= 0.) ? tmpLocalAabbMin[0] : tmpLocalAabbMax[0];
81 localAabbMin[1] = (
m_localScaling.
getY() >= 0.) ? tmpLocalAabbMin[1] : tmpLocalAabbMax[1];
82 localAabbMin[2] = (
m_localScaling.
getZ() >= 0.) ? tmpLocalAabbMin[2] : tmpLocalAabbMax[2];
83 localAabbMax[0] = (
m_localScaling.
getX() <= 0.) ? tmpLocalAabbMin[0] : tmpLocalAabbMax[0];
84 localAabbMax[1] = (
m_localScaling.
getY() <= 0.) ? tmpLocalAabbMin[1] : tmpLocalAabbMax[1];
85 localAabbMax[2] = (
m_localScaling.
getZ() <= 0.) ? tmpLocalAabbMin[2] : tmpLocalAabbMax[2];
89 localHalfExtents +=
btVector3(margin, margin, margin);
96 btVector3 extent = localHalfExtents.
dot3(abs_b[0], abs_b[1], abs_b[2]);
97 aabbMin = center - extent;
98 aabbMax = center + extent;
@ SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
The btBvhTriangleMeshShape is a static-triangle mesh shape, it can only be used for fixed/non-moving ...
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
virtual btScalar getMargin() const
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMatrix3x3 absolute() const
Return the matrix with all values non negative.
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
virtual void setLocalScaling(const btVector3 &scaling)
virtual const btVector3 & getLocalScaling() const
btBvhTriangleMeshShape * m_bvhTriMeshShape
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
virtual ~btScaledBvhTriangleMeshShape()
btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape *childShape, const btVector3 &localScaling)
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
btScaledTriangleCallback(btTriangleCallback *originalCallback, const btVector3 &localScaling)
btTriangleCallback * m_originalCallback
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)=0
const btVector3 & getLocalAabbMax() const
const btVector3 & getLocalAabbMin() const
btVector3 can be used to represent 3D points and vectors.
const btScalar & getZ() const
Return the z value.
btVector3 dot3(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2) const
const btScalar & getY() const
Return the y value.
const btScalar & getX() const
Return the x value.