20btCapsuleShape::btCapsuleShape(
btScalar radius,
btScalar height) : btConvexInternalShape()
28btVector3 btCapsuleShape::localGetSupportingVertexWithoutMargin(
const btVector3& vec0)
const
30 btVector3 supVec(0, 0, 0);
38 vec.setValue(1, 0, 0);
50 btVector3
pos(0, 0, 0);
54 newDot = vec.dot(vtx);
62 btVector3
pos(0, 0, 0);
66 newDot = vec.dot(vtx);
77void btCapsuleShape::batchedUnitVectorGetSupportingVertexWithoutMargin(
const btVector3* vectors, btVector3* supportVerticesOut,
int numVectors)
const
79 for (
int j = 0; j < numVectors; j++)
82 const btVector3& vec = vectors[j];
87 btVector3
pos(0, 0, 0);
90 newDot = vec.dot(vtx);
94 supportVerticesOut[j] = vtx;
98 btVector3
pos(0, 0, 0);
101 newDot = vec.dot(vtx);
105 supportVerticesOut[j] = vtx;
111void btCapsuleShape::calculateLocalInertia(
btScalar mass, btVector3& inertia)
const
120 btVector3 halfExtents(radius, radius, radius);
131 inertia[0] = scaledmass * (y2 + z2);
132 inertia[1] = scaledmass * (x2 + z2);
133 inertia[2] = scaledmass * (x2 + y2);
@ CAPSULE_SHAPE_PROXYTYPE
btScalar getRadius() const
btScalar getHalfHeight() const
btScalar m_collisionMargin
btVector3 m_implicitShapeDimensions
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btSqrt(btScalar y)
SIMD_FORCE_INLINE long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
btCapsuleShapeX(btScalar radius, btScalar height)
btCapsuleShapeZ(btScalar radius, btScalar height)