16#ifndef BT_VORONOI_SIMPLEX_SOLVER_H
17#define BT_VORONOI_SIMPLEX_SOLVER_H
21#define VORONOI_SIMPLEX_MAX_VERTS 5
24#define BT_USE_EQUAL_VERTEX_THRESHOLD
26#ifdef BT_USE_DOUBLE_PRECISION
27#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 1e-12f
29#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f
92#ifdef NO_VIRTUAL_INTERFACE
126 int pointOutsideOfPlane(
const btVector3& p,
const btVector3& a,
const btVector3&
b,
const btVector3& c,
const btVector3& d);
136 void addVertex(
const btVector3&
w,
const btVector3& p,
const btVector3& q);
157 int getSimplex(btVector3 * pBuf, btVector3 * qBuf, btVector3 * yBuf)
const;
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
#define BT_DECLARE_ALIGNED_ALLOCATOR()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
#define btSimplexSolverInterface
void reduceVertices(const btUsageBitfield &usedVerts)
int getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const
void addVertex(const btVector3 &w, const btVector3 &p, const btVector3 &q)
bool closestPtPointTetrahedron(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &d, btSubSimplexClosestResult &finalResult)
btScalar getEqualVertexThreshold() const
#define VORONOI_SIMPLEX_MAX_VERTS
bool inSimplex(const btVector3 &w)
bool emptySimplex() const
void setEqualVertexThreshold(btScalar threshold)
bool m_cachedValidClosest
int pointOutsideOfPlane(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &d)
Test if point p and d lie on opposite sides of plane through abc.
btVector3 m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS]
btSubSimplexClosestResult m_cachedBC
void compute_points(btVector3 &p1, btVector3 &p2)
bool updateClosestVectorAndPoints()
bool closestPtPointTriangle(const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, btSubSimplexClosestResult &result)
#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD
bool closest(btVector3 &v)
btVector3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS]
btVector3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS]
void removeVertex(int index)
void backup_closest(btVector3 &v)
btScalar m_equalVertexThreshold
local_group_size(16, 16) .push_constant(Type b
void setBarycentricCoordinates(btScalar a=btScalar(0.), btScalar b=btScalar(0.), btScalar c=btScalar(0.), btScalar d=btScalar(0.))
btUsageBitfield m_usedVertices
btScalar m_barycentricCoords[4]
btVector3 m_closestPointOnSimplex
unsigned short usedVertexC
unsigned short usedVertexB
unsigned short usedVertexA
unsigned short usedVertexD