Blender V2.61 - r43446
|
#include <btVoronoiSimplexSolver.h>
Public Member 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) |
btVoronoiSimplexSolver () | |
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 |
Public Attributes | |
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 |
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 95 of file btVoronoiSimplexSolver.h.
btVoronoiSimplexSolver::btVoronoiSimplexSolver | ( | ) | [inline] |
Definition at line 133 of file btVoronoiSimplexSolver.h.
void btVoronoiSimplexSolver::addVertex | ( | const btVector3 & | w, |
const btVector3 & | p, | ||
const btVector3 & | q | ||
) |
Definition at line 78 of file btVoronoiSimplexSolver.cpp.
References m_lastW, m_needsUpdate, m_numVertices, m_simplexPointsP, m_simplexPointsQ, m_simplexVectorW, p, and simple_enum_gen::w.
void btVoronoiSimplexSolver::backup_closest | ( | btVector3 & | v | ) |
Definition at line 307 of file btVoronoiSimplexSolver.cpp.
References m_cachedV.
bool btVoronoiSimplexSolver::closest | ( | btVector3 & | v | ) |
Definition at line 243 of file btVoronoiSimplexSolver.cpp.
References m_cachedV, and updateClosestVectorAndPoints().
bool btVoronoiSimplexSolver::closestPtPointTetrahedron | ( | const btVector3 & | p, |
const btVector3 & | a, | ||
const btVector3 & | b, | ||
const btVector3 & | c, | ||
const btVector3 & | d, | ||
btSubSimplexClosestResult & | finalResult | ||
) |
Definition at line 457 of file btVoronoiSimplexSolver.cpp.
References closestPtPointTriangle(), dot(), FLT_MAX, btSubSimplexClosestResult::m_barycentricCoords, btSubSimplexClosestResult::m_closestPointOnSimplex, btSubSimplexClosestResult::m_degenerate, btSubSimplexClosestResult::m_usedVertices, p, pointOutsideOfPlane(), btUsageBitfield::reset(), btSubSimplexClosestResult::setBarycentricCoordinates(), btUsageBitfield::usedVertexA, btUsageBitfield::usedVertexB, btUsageBitfield::usedVertexC, btUsageBitfield::usedVertexD, VERTA, VERTB, and VERTC.
Referenced by updateClosestVectorAndPoints().
bool btVoronoiSimplexSolver::closestPtPointTriangle | ( | const btVector3 & | p, |
const btVector3 & | a, | ||
const btVector3 & | b, | ||
const btVector3 & | c, | ||
btSubSimplexClosestResult & | result | ||
) |
Definition at line 330 of file btVoronoiSimplexSolver.cpp.
References btSubSimplexClosestResult::m_closestPointOnSimplex, btSubSimplexClosestResult::m_usedVertices, btUsageBitfield::reset(), btSubSimplexClosestResult::setBarycentricCoordinates(), btUsageBitfield::usedVertexA, btUsageBitfield::usedVertexB, btUsageBitfield::usedVertexC, and simple_enum_gen::w.
Referenced by closestPtPointTetrahedron(), and updateClosestVectorAndPoints().
void btVoronoiSimplexSolver::compute_points | ( | btVector3 & | p1, |
btVector3 & | p2 | ||
) |
Definition at line 319 of file btVoronoiSimplexSolver.cpp.
References m_cachedP1, m_cachedP2, and updateClosestVectorAndPoints().
bool btVoronoiSimplexSolver::emptySimplex | ( | ) | const |
Definition at line 313 of file btVoronoiSimplexSolver.cpp.
References numVertices().
bool btVoronoiSimplexSolver::fullSimplex | ( | ) | const [inline] |
Definition at line 155 of file btVoronoiSimplexSolver.h.
References m_numVertices.
btScalar btVoronoiSimplexSolver::getEqualVertexThreshold | ( | ) | const [inline] |
Definition at line 146 of file btVoronoiSimplexSolver.h.
References m_equalVertexThreshold.
int btVoronoiSimplexSolver::getSimplex | ( | btVector3 * | pBuf, |
btVector3 * | qBuf, | ||
btVector3 * | yBuf | ||
) | const |
Definition at line 268 of file btVoronoiSimplexSolver.cpp.
References i, m_simplexPointsP, m_simplexPointsQ, m_simplexVectorW, and numVertices().
bool btVoronoiSimplexSolver::inSimplex | ( | const btVector3 & | w | ) |
Definition at line 283 of file btVoronoiSimplexSolver.cpp.
References i, m_equalVertexThreshold, m_lastW, m_simplexVectorW, and numVertices().
btScalar btVoronoiSimplexSolver::maxVertex | ( | ) |
Definition at line 252 of file btVoronoiSimplexSolver.cpp.
References i, m_simplexVectorW, and numVertices().
int btVoronoiSimplexSolver::numVertices | ( | ) | const [inline] |
Definition at line 170 of file btVoronoiSimplexSolver.h.
References m_numVertices.
Referenced by emptySimplex(), getSimplex(), inSimplex(), maxVertex(), reduceVertices(), and updateClosestVectorAndPoints().
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 430 of file btVoronoiSimplexSolver.cpp.
References cross(), dot(), and credits_svn_gen::e.
Referenced by closestPtPointTetrahedron().
void btVoronoiSimplexSolver::reduceVertices | ( | const btUsageBitfield & | usedVerts | ) |
Definition at line 45 of file btVoronoiSimplexSolver.cpp.
References numVertices(), removeVertex(), btUsageBitfield::usedVertexA, btUsageBitfield::usedVertexB, btUsageBitfield::usedVertexC, and btUsageBitfield::usedVertexD.
Referenced by updateClosestVectorAndPoints().
void btVoronoiSimplexSolver::removeVertex | ( | int | index | ) |
Definition at line 35 of file btVoronoiSimplexSolver.cpp.
References btAssert, m_numVertices, m_simplexPointsP, m_simplexPointsQ, and m_simplexVectorW.
Referenced by reduceVertices().
void btVoronoiSimplexSolver::reset | ( | ) |
Definition at line 66 of file btVoronoiSimplexSolver.cpp.
References BT_LARGE_FLOAT, m_cachedBC, m_cachedValidClosest, m_lastW, m_needsUpdate, m_numVertices, and btSubSimplexClosestResult::reset().
void btVoronoiSimplexSolver::setEqualVertexThreshold | ( | btScalar | threshold | ) | [inline] |
Definition at line 141 of file btVoronoiSimplexSolver.h.
References m_equalVertexThreshold.
bool btVoronoiSimplexSolver::updateClosestVectorAndPoints | ( | ) |
Definition at line 90 of file btVoronoiSimplexSolver.cpp.
References closestPtPointTetrahedron(), closestPtPointTriangle(), simple_enum_gen::d, KDL::diff(), btSubSimplexClosestResult::isValid(), btSubSimplexClosestResult::m_barycentricCoords, m_cachedBC, m_cachedP1, m_cachedP2, m_cachedV, m_cachedValidClosest, btSubSimplexClosestResult::m_degenerate, m_needsUpdate, m_simplexPointsP, m_simplexPointsQ, m_simplexVectorW, btSubSimplexClosestResult::m_usedVertices, numVertices(), p, reduceVertices(), btSubSimplexClosestResult::reset(), btSubSimplexClosestResult::setBarycentricCoordinates(), btUsageBitfield::usedVertexA, and btUsageBitfield::usedVertexB.
Referenced by closest(), and compute_points().
Definition at line 119 of file btVoronoiSimplexSolver.h.
Referenced by reset(), and updateClosestVectorAndPoints().
btVector3 btVoronoiSimplexSolver::m_cachedP1 |
Definition at line 110 of file btVoronoiSimplexSolver.h.
Referenced by compute_points(), and updateClosestVectorAndPoints().
btVector3 btVoronoiSimplexSolver::m_cachedP2 |
Definition at line 111 of file btVoronoiSimplexSolver.h.
Referenced by compute_points(), and updateClosestVectorAndPoints().
btVector3 btVoronoiSimplexSolver::m_cachedV |
Definition at line 112 of file btVoronoiSimplexSolver.h.
Referenced by backup_closest(), closest(), and updateClosestVectorAndPoints().
Definition at line 116 of file btVoronoiSimplexSolver.h.
Referenced by reset(), and updateClosestVectorAndPoints().
Definition at line 115 of file btVoronoiSimplexSolver.h.
Referenced by getEqualVertexThreshold(), inSimplex(), and setEqualVertexThreshold().
btVector3 btVoronoiSimplexSolver::m_lastW |
Definition at line 113 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), inSimplex(), and reset().
Definition at line 121 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), reset(), and updateClosestVectorAndPoints().
Definition at line 102 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), fullSimplex(), numVertices(), removeVertex(), and reset().
btVector3 btVoronoiSimplexSolver::m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS] |
Definition at line 105 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), getSimplex(), removeVertex(), and updateClosestVectorAndPoints().
btVector3 btVoronoiSimplexSolver::m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS] |
Definition at line 106 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), getSimplex(), removeVertex(), and updateClosestVectorAndPoints().
btVector3 btVoronoiSimplexSolver::m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS] |
Definition at line 104 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), getSimplex(), inSimplex(), maxVertex(), removeVertex(), and updateClosestVectorAndPoints().