84 nearest =
from +
t * v;
103 btVector3 normal = (vertices[1] - vertices[0]).cross(vertices[2] - vertices[0]);
211 if ((
r1 > 0 &&
r2 > 0 &&
r3 > 0) ||
212 (
r1 <= 0 &&
r2 <= 0 &&
r3 <= 0))
btScalar SegmentSqrDistance(const btVector3 &from, const btVector3 &to, const btVector3 &p, btVector3 &nearest)
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...
btScalar btSqrt(btScalar y)
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
The btSphereShape implements an implicit sphere, centered around a local origin with radius.
btScalar getRadius() const
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
virtual int getNumEdges() const
btVector3 & getVertexPtr(int index)
btVector3 can be used to represent 3D points and vectors.
btScalar dot(const btVector3 &v) const
Return the dot product.
btScalar length2() const
Return the length of the vector squared.
btTriangleShape * m_triangle
bool collide(const btVector3 &sphereCenter, btVector3 &point, btVector3 &resultNormal, btScalar &depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold)
SphereTriangleDetector(btSphereShape *sphere, btTriangleShape *triangle, btScalar contactBreakingThreshold)
bool pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p)
bool facecontains(const btVector3 &p, const btVector3 *vertices, btVector3 &normal)
virtual void getClosestPoints(const ClosestPointInput &input, Result &output, class btIDebugDraw *debugDraw, bool swapResults=false)
btScalar m_contactBreakingThreshold