Blender V5.0
btVoronoiSimplexSolver.h File Reference

Go to the source code of this file.

Classes

struct  btUsageBitfield
struct  btSubSimplexClosestResult

Macros

#define VORONOI_SIMPLEX_MAX_VERTS   5
#define BT_USE_EQUAL_VERTEX_THRESHOLD
 disable next define, or use defaultCollisionConfiguration->getSimplexSolver()->setEqualVertexThreshold(0.f) to disable/configure
#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD   0.0001f

Functions

void removeVertex (int index)
void reduceVertices (const btUsageBitfield &usedVerts)
bool updateClosestVectorAndPoints ()
bool closestPtPointTetrahedron (const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, const btVector3 &d, btSubSimplexClosestResult &finalResult)
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.
bool closestPtPointTriangle (const btVector3 &p, const btVector3 &a, const btVector3 &b, const btVector3 &c, btSubSimplexClosestResult &result)
void reset ()
void addVertex (const btVector3 &w, const btVector3 &p, const btVector3 &q)
void setEqualVertexThreshold (btScalar threshold)
btScalar getEqualVertexThreshold () const
bool closest (btVector3 &v)
btScalar maxVertex ()
bool fullSimplex () const
int getSimplex (btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const
bool inSimplex (const btVector3 &w)
void backup_closest (btVector3 &v)
bool emptySimplex () const
void compute_points (btVector3 &p1, btVector3 &p2)
int numVertices () const

Variables

 btVoronoiSimplexSolver
int m_numVertices
btVector3 m_simplexVectorW [VORONOI_SIMPLEX_MAX_VERTS]
btVector3 m_simplexPointsP [VORONOI_SIMPLEX_MAX_VERTS]
btVector3 m_simplexPointsQ [VORONOI_SIMPLEX_MAX_VERTS]
btVector3 m_cachedP1
btVector3 m_cachedP2
btVector3 m_cachedV
btVector3 m_lastW
btScalar m_equalVertexThreshold
bool m_cachedValidClosest
btSubSimplexClosestResult m_cachedBC
bool m_needsUpdate

Macro Definition Documentation

◆ BT_USE_EQUAL_VERTEX_THRESHOLD

#define BT_USE_EQUAL_VERTEX_THRESHOLD

disable next define, or use defaultCollisionConfiguration->getSimplexSolver()->setEqualVertexThreshold(0.f) to disable/configure

Definition at line 24 of file btVoronoiSimplexSolver.h.

◆ VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD

#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD   0.0001f

Definition at line 29 of file btVoronoiSimplexSolver.h.

◆ VORONOI_SIMPLEX_MAX_VERTS

#define VORONOI_SIMPLEX_MAX_VERTS   5

Definition at line 21 of file btVoronoiSimplexSolver.h.

Function Documentation

◆ addVertex()

void btVoronoiSimplexSolver::addVertex ( const btVector3 & w,
const btVector3 & p,
const btVector3 & q )

◆ backup_closest()

void btVoronoiSimplexSolver::backup_closest ( btVector3 & v)

Definition at line 296 of file btVoronoiSimplexSolver.cpp.

References btVector3, m_cachedV, and v.

◆ closest()

◆ closestPtPointTetrahedron()

◆ closestPtPointTriangle()

bool btVoronoiSimplexSolver::closestPtPointTriangle ( const btVector3 & p,
const btVector3 & a,
const btVector3 & b,
const btVector3 & c,
btSubSimplexClosestResult & result )

Definition at line 313 of file btVoronoiSimplexSolver.cpp.

References b, btVector3, result, v, and w().

Referenced by closestPtPointTetrahedron(), and updateClosestVectorAndPoints().

◆ compute_points()

void btVoronoiSimplexSolver::compute_points ( btVector3 & p1,
btVector3 & p2 )

◆ emptySimplex()

bool btVoronoiSimplexSolver::emptySimplex ( ) const

Definition at line 301 of file btVoronoiSimplexSolver.cpp.

References numVertices().

◆ fullSimplex()

bool fullSimplex ( ) const

Definition at line 152 of file btVoronoiSimplexSolver.h.

References m_numVertices.

◆ getEqualVertexThreshold()

btScalar getEqualVertexThreshold ( ) const

Definition at line 143 of file btVoronoiSimplexSolver.h.

References m_equalVertexThreshold.

◆ getSimplex()

int btVoronoiSimplexSolver::getSimplex ( btVector3 * pBuf,
btVector3 * qBuf,
btVector3 * yBuf ) const

◆ inSimplex()

bool btVoronoiSimplexSolver::inSimplex ( const btVector3 & w)

◆ maxVertex()

btScalar btVoronoiSimplexSolver::maxVertex ( )

Definition at line 243 of file btVoronoiSimplexSolver.cpp.

References i, m_simplexVectorW, and numVertices().

◆ numVertices()

◆ pointOutsideOfPlane()

int btVoronoiSimplexSolver::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.

Definition at line 411 of file btVoronoiSimplexSolver.cpp.

References b, btVector3, cross, dot(), and e.

Referenced by closestPtPointTetrahedron().

◆ reduceVertices()

◆ removeVertex()

void btVoronoiSimplexSolver::removeVertex ( int index)

◆ reset()

void reset ( )

Definition at line 40 of file btTetrahedronShape.h.

◆ setEqualVertexThreshold()

void setEqualVertexThreshold ( btScalar threshold)

Definition at line 138 of file btVoronoiSimplexSolver.h.

References m_equalVertexThreshold.

◆ updateClosestVectorAndPoints()

Variable Documentation

◆ btVoronoiSimplexSolver

btVoronoiSimplexSolver
Initial value:
{
public:
#define BT_DECLARE_ALIGNED_ALLOCATOR()
Definition btScalar.h:425

btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points simplex to the origin. Can be used with GJK, as an alternative to Johnson distance algorithm.

Definition at line 94 of file btVoronoiSimplexSolver.h.

Referenced by btComputeGjkEpaPenetration(), btConvex2dConvex2dAlgorithm::calculateTimeOfImpact(), btConvexConvexAlgorithm::calculateTimeOfImpact(), btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(), btCollisionWorld::objectQuerySingleInternal(), btConvexConvexAlgorithm::processCollision(), btTriangleConvexcastCallback::processTriangle(), and btCollisionWorld::rayTestSingleInternal().

◆ m_cachedBC

Definition at line 117 of file btVoronoiSimplexSolver.h.

Referenced by updateClosestVectorAndPoints().

◆ m_cachedP1

btVector3 m_cachedP1

Definition at line 109 of file btVoronoiSimplexSolver.h.

Referenced by compute_points(), and updateClosestVectorAndPoints().

◆ m_cachedP2

btVector3 m_cachedP2

Definition at line 110 of file btVoronoiSimplexSolver.h.

Referenced by compute_points(), and updateClosestVectorAndPoints().

◆ m_cachedV

btVector3 m_cachedV

Definition at line 111 of file btVoronoiSimplexSolver.h.

Referenced by backup_closest(), closest(), and updateClosestVectorAndPoints().

◆ m_cachedValidClosest

bool m_cachedValidClosest

Definition at line 115 of file btVoronoiSimplexSolver.h.

Referenced by updateClosestVectorAndPoints().

◆ m_equalVertexThreshold

◆ m_lastW

btVector3 m_lastW

Definition at line 112 of file btVoronoiSimplexSolver.h.

Referenced by addVertex(), and inSimplex().

◆ m_needsUpdate

bool m_needsUpdate

Definition at line 119 of file btVoronoiSimplexSolver.h.

Referenced by addVertex(), and updateClosestVectorAndPoints().

◆ m_numVertices

int m_numVertices

Definition at line 103 of file btVoronoiSimplexSolver.h.

◆ m_simplexPointsP

◆ m_simplexPointsQ

◆ m_simplexVectorW