Blender
V3.3
|
#include "btSimplexSolverInterface.h"
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 More... | |
#define | VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f |
#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.
#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f |
Definition at line 29 of file btVoronoiSimplexSolver.h.
#define VORONOI_SIMPLEX_MAX_VERTS 5 |
Definition at line 21 of file btVoronoiSimplexSolver.h.
void btVoronoiSimplexSolver::addVertex | ( | const btVector3 & | w, |
const btVector3 & | p, | ||
const btVector3 & | q | ||
) |
Definition at line 69 of file btVoronoiSimplexSolver.cpp.
References m_lastW, m_needsUpdate, m_numVertices, m_simplexPointsP, m_simplexPointsQ, m_simplexVectorW, and w().
Definition at line 296 of file btVoronoiSimplexSolver.cpp.
Definition at line 236 of file btVoronoiSimplexSolver.cpp.
References m_cachedV, updateClosestVectorAndPoints(), and v.
Referenced by apply_stroke_envelope(), BKE_gpencil_stroke_trim(), bm_edgexvert_isect_impl(), clip_to_ortho_planes(), Freestyle::GridHelpers::closestPointOnPolygon(), dist_squared_to_line_segment_v2(), dist_squared_to_line_segment_v3(), dist_squared_to_line_v2(), dist_squared_to_line_v3(), heat_source_distance(), marker_jump_exec(), paintcurve_point_get_closest(), and TargetSnapClosest().
bool btVoronoiSimplexSolver::closestPtPointTetrahedron | ( | const btVector3 & | p, |
const btVector3 & | a, | ||
const btVector3 & | b, | ||
const btVector3 & | c, | ||
const btVector3 & | d, | ||
btSubSimplexClosestResult & | finalResult | ||
) |
Definition at line 437 of file btVoronoiSimplexSolver.cpp.
References Freestyle::a, usdtokens::b(), btVector3, Freestyle::c, closestPtPointTriangle(), blender::math::dot(), btSubSimplexClosestResult::m_barycentricCoords, btSubSimplexClosestResult::m_closestPointOnSimplex, btSubSimplexClosestResult::m_degenerate, btSubSimplexClosestResult::m_usedVertices, 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 313 of file btVoronoiSimplexSolver.cpp.
References Freestyle::a, usdtokens::b(), btVector3, Freestyle::c, result, v, and w().
Referenced by closestPtPointTetrahedron(), and updateClosestVectorAndPoints().
Definition at line 306 of file btVoronoiSimplexSolver.cpp.
References m_cachedP1, m_cachedP2, and updateClosestVectorAndPoints().
bool btVoronoiSimplexSolver::emptySimplex | ( | ) | const |
Definition at line 301 of file btVoronoiSimplexSolver.cpp.
References numVertices().
bool fullSimplex | ( | ) | const |
Definition at line 152 of file btVoronoiSimplexSolver.h.
References m_numVertices.
btScalar getEqualVertexThreshold | ( | ) | const |
Definition at line 143 of file btVoronoiSimplexSolver.h.
References m_equalVertexThreshold.
int btVoronoiSimplexSolver::getSimplex | ( | btVector3 * | pBuf, |
btVector3 * | qBuf, | ||
btVector3 * | yBuf | ||
) | const |
Definition at line 257 of file btVoronoiSimplexSolver.cpp.
References m_simplexPointsP, m_simplexPointsQ, m_simplexVectorW, and numVertices().
Definition at line 269 of file btVoronoiSimplexSolver.cpp.
References distance2(), m_equalVertexThreshold, m_lastW, m_simplexVectorW, numVertices(), and w().
btScalar btVoronoiSimplexSolver::maxVertex | ( | ) |
Definition at line 243 of file btVoronoiSimplexSolver.cpp.
References m_simplexVectorW, and numVertices().
int numVertices | ( | ) | const |
Definition at line 167 of file btVoronoiSimplexSolver.h.
References m_numVertices, and m_vertices.
Referenced by btTriangleIndexVertexArray(), btPolyhedralContactClipping::clipHullAgainstHull(), btDefaultSoftBodySolver::copySoftBodyToVertexBuffer(), emptySimplex(), GenerateSharedVerticesIndexList(), getSimplex(), initialize2(), initializePolyhedralFeatures(), inSimplex(), maxVertex(), Freestyle::FEdgeXDetector::ProcessRidgeFace(), Freestyle::FEdgeXDetector::ProcessSilhouetteFace(), Freestyle::FEdgeXDetector::ProcessSuggestiveContourFace(), 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 411 of file btVoronoiSimplexSolver.cpp.
References Freestyle::a, usdtokens::b(), btVector3, Freestyle::c, blender::math::cross(), blender::math::dot(), e, and normal.
Referenced by closestPtPointTetrahedron().
void btVoronoiSimplexSolver::reduceVertices | ( | const btUsageBitfield & | usedVerts | ) |
Definition at line 43 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 34 of file btVoronoiSimplexSolver.cpp.
References btAssert, m_numVertices, m_simplexPointsP, m_simplexPointsQ, and m_simplexVectorW.
Referenced by reduceVertices().
void reset | ( | ) |
Definition at line 517 of file kernel/device/gpu/kernel.h.
Definition at line 138 of file btVoronoiSimplexSolver.h.
References m_equalVertexThreshold, and threshold.
bool btVoronoiSimplexSolver::updateClosestVectorAndPoints | ( | ) |
Definition at line 81 of file btVoronoiSimplexSolver.cpp.
References Freestyle::a, usdtokens::b(), btVector3, Freestyle::c, closestPtPointTetrahedron(), closestPtPointTriangle(), KDL::diff(), from, 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(), reduceVertices(), btSubSimplexClosestResult::reset(), btSubSimplexClosestResult::setBarycentricCoordinates(), t, btUsageBitfield::usedVertexA, btUsageBitfield::usedVertexB, and v.
Referenced by closest(), and compute_points().
btVoronoiSimplexSolver |
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 btConvex2dConvex2dAlgorithm::calculateTimeOfImpact(), btConvexConvexAlgorithm::calculateTimeOfImpact(), btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(), btCollisionWorld::objectQuerySingleInternal(), btConvexConvexAlgorithm::processCollision(), btTriangleConvexcastCallback::processTriangle(), and btCollisionWorld::rayTestSingleInternal().
btSubSimplexClosestResult m_cachedBC |
Definition at line 117 of file btVoronoiSimplexSolver.h.
Referenced by updateClosestVectorAndPoints().
btVector3 m_cachedP1 |
Definition at line 109 of file btVoronoiSimplexSolver.h.
Referenced by compute_points(), and updateClosestVectorAndPoints().
btVector3 m_cachedP2 |
Definition at line 110 of file btVoronoiSimplexSolver.h.
Referenced by compute_points(), and updateClosestVectorAndPoints().
btVector3 m_cachedV |
Definition at line 111 of file btVoronoiSimplexSolver.h.
Referenced by backup_closest(), closest(), and updateClosestVectorAndPoints().
bool m_cachedValidClosest |
Definition at line 115 of file btVoronoiSimplexSolver.h.
Referenced by updateClosestVectorAndPoints().
btScalar m_equalVertexThreshold |
Definition at line 114 of file btVoronoiSimplexSolver.h.
Referenced by getEqualVertexThreshold(), inSimplex(), btConnectivityProcessor::processTriangle(), and setEqualVertexThreshold().
btVector3 m_lastW |
Definition at line 112 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), and inSimplex().
bool m_needsUpdate |
Definition at line 119 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), and updateClosestVectorAndPoints().
int m_numVertices |
Definition at line 103 of file btVoronoiSimplexSolver.h.
Referenced by fullSimplex(), and numVertices().
btVector3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS] |
Definition at line 106 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), getSimplex(), removeVertex(), and updateClosestVectorAndPoints().
btVector3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS] |
Definition at line 107 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), getSimplex(), removeVertex(), and updateClosestVectorAndPoints().
btVector3 m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS] |
Definition at line 105 of file btVoronoiSimplexSolver.h.
Referenced by addVertex(), getSimplex(), inSimplex(), maxVertex(), removeVertex(), and updateClosestVectorAndPoints().