|
SegmentSegmentCcdIntervalCheck uses the Interval classes including the LinearMotion and Polynomial families to quickly determine if there is a possible collision between two moving segments over a specified time interval. More...
#include <SurgSim/Collision/SegmentSegmentCcdIntervalCheck.h>
Public Types | |
| enum | IntervalCheckResults { IntervalCheckPossibleCollision, IntervalCheckNoCollisionVolume, IntervalCheckNoCollisionEndpoints } |
| Enum Possible interval check return values. More... | |
Public Member Functions | |
| SegmentSegmentCcdIntervalCheck (const std::array< Math::Vector3d, 2 > &pT0, const std::array< Math::Vector3d, 2 > &pT1, const std::array< Math::Vector3d, 2 > &qT0, const std::array< Math::Vector3d, 2 > &qT1, double thicknessP, double thicknessQ, double timePrecisionEpsilon, double distanceEpsilon) | |
| Constructor. More... | |
| const Math::PolynomialValues< double, 3 > & | P1Q1_P1P2_Q1Q2 () const |
| Triple product value. More... | |
| Math::Interval< double > | crossValueOnInterval (const Math::Interval< double > &range) const |
| IntervalCheckResults | possibleCollisionTestNoThickness (const Math::Interval< double > &range) const |
| Check if a collision is possible within a specified time interval assuming ideal (0 thickness) segments. More... | |
| IntervalCheckResults | possibleCollisionTestWithThickness (const Math::Interval< double > &range) const |
| Check if a collision is possible within a specified time interval assuming segments with fixed radius. More... | |
| const Math::LinearMotionND< double, 3 > & | motionP1 () const |
| const Math::LinearMotionND< double, 3 > & | motionP2 () const |
| const Math::LinearMotionND< double, 3 > & | motionQ1 () const |
| const Math::LinearMotionND< double, 3 > & | motionQ2 () const |
| Math::Vector3d | p1T0 () const |
| Math::Vector3d | p1T1 () const |
| Math::Vector3d | p2T0 () const |
| Math::Vector3d | p2T1 () const |
| Math::Vector3d | q1T0 () const |
| Math::Vector3d | q1T1 () const |
| Math::Vector3d | q2T0 () const |
| Math::Vector3d | q2T1 () const |
| const Math::PolynomialValues< double, 2 > & | P1P2_P1Q1 () const |
| const Math::PolynomialValues< double, 2 > & | Q1Q2_P1Q1 () const |
| const Math::PolynomialValues< double, 2 > & | P1P2_Q1Q2 () const |
| const Math::PolynomialValues< double, 2 > & | P1P2_sq () const |
| const Math::PolynomialValues< double, 2 > & | Q1Q2_sq () const |
| double | thicknessP () const |
| double | thicknessQ () const |
| void | setTimePrecisionEpsilon (double epsilon) |
| void | setDistanceEpsilon (double epsilon) |
| void | setTripleProductEpsilon (double epsilon) |
| void | setMuNuEpsilon (double epsilon) |
| double | timePrecisionEpsilon () const |
| double | distanceEpsilon () const |
| double | tripleProductEpsilon () const |
| double | muNuEpsilon () const |
Private Member Functions | |
| SegmentSegmentCcdIntervalCheck (const SegmentSegmentCcdIntervalCheck &) | |
| SegmentSegmentCcdIntervalCheck & | operator= (const SegmentSegmentCcdIntervalCheck &) |
SegmentSegmentCcdIntervalCheck uses the Interval classes including the LinearMotion and Polynomial families to quickly determine if there is a possible collision between two moving segments over a specified time interval.
The time interval under consideration is defined as a subset of the parametric time interval [0, 1].
Details of the actual time of collision and the implementation of the recursion strategy are at a higher level.
Enum Possible interval check return values.
IntervalCheckPossibleCollision indicates the given interval may have a collision between the segments, while IntervalCheckNoCollisionVolume indicates no collision based on a gross volume calculation and IntervalCheckNoCollisionEndpoints indicates that the endpoint check indicates that the segments do not overlap at closest approach.
| Enumerator | |
|---|---|
| IntervalCheckPossibleCollision | |
| IntervalCheckNoCollisionVolume | |
| IntervalCheckNoCollisionEndpoints | |
| SurgSim::Collision::SegmentSegmentCcdIntervalCheck::SegmentSegmentCcdIntervalCheck | ( | const std::array< Math::Vector3d, 2 > & | pT0, |
| const std::array< Math::Vector3d, 2 > & | pT1, | ||
| const std::array< Math::Vector3d, 2 > & | qT0, | ||
| const std::array< Math::Vector3d, 2 > & | qT1, | ||
| double | thicknessP, | ||
| double | thicknessQ, | ||
| double | timePrecisionEpsilon, | ||
| double | distanceEpsilon | ||
| ) |
Constructor.
| pT0 | Starting and ending vertices for segment p at time 0 |
| pT1 | Starting and ending vertices for segment p at time 1 |
| qT0 | Starting and ending vertices for segment q at time 0 |
| qT1 | Starting and ending vertices for segment q at time 1 |
| thicknessP | Radius of segment P |
| thicknessQ | Radius of segment Q |
| timePrecisionEpsilon | Desired time accuracy |
| distanceEpsilon | Desired distance accuracy |
|
private |
Private constructor and assignment operators to prevent copying.
| Math::Interval< double > SurgSim::Collision::SegmentSegmentCcdIntervalCheck::crossValueOnInterval | ( | const Math::Interval< double > & | range | ) | const |
| range | the interval over which the cross product values are to be bounded. |
| double SurgSim::Collision::SegmentSegmentCcdIntervalCheck::distanceEpsilon | ( | ) | const |
Algorithm epsilons
| const Math::LinearMotionND< double, 3 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::motionP1 | ( | ) | const |
Motion accessors
| const Math::LinearMotionND< double, 3 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::motionP2 | ( | ) | const |
Motion accessors
| const Math::LinearMotionND< double, 3 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::motionQ1 | ( | ) | const |
Motion accessors
| const Math::LinearMotionND< double, 3 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::motionQ2 | ( | ) | const |
Motion accessors
| double SurgSim::Collision::SegmentSegmentCcdIntervalCheck::muNuEpsilon | ( | ) | const |
Algorithm epsilons
|
private |
Private constructor and assignment operators to prevent copying.
| const Math::PolynomialValues< double, 2 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::P1P2_P1Q1 | ( | ) | const |
Dot product accessors for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t)
| const Math::PolynomialValues< double, 2 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::P1P2_Q1Q2 | ( | ) | const |
Dot product accessors for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t)
| const Math::PolynomialValues< double, 2 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::P1P2_sq | ( | ) | const |
Magnitude squared product accessors
| const Math::PolynomialValues< double, 3 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::P1Q1_P1P2_Q1Q2 | ( | ) | const |
Triple product value.
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::p1T0 | ( | ) | const |
Endpoint accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::p1T1 | ( | ) | const |
Endpoint accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::p2T0 | ( | ) | const |
Endpoint accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::p2T1 | ( | ) | const |
Endpoint accessors
| SegmentSegmentCcdIntervalCheck::IntervalCheckResults SurgSim::Collision::SegmentSegmentCcdIntervalCheck::possibleCollisionTestNoThickness | ( | const Math::Interval< double > & | range | ) | const |
Check if a collision is possible within a specified time interval assuming ideal (0 thickness) segments.
| range | the parametric [0, 1] time interval over which the collision is to be detected. |
| SegmentSegmentCcdIntervalCheck::IntervalCheckResults SurgSim::Collision::SegmentSegmentCcdIntervalCheck::possibleCollisionTestWithThickness | ( | const Math::Interval< double > & | range | ) | const |
Check if a collision is possible within a specified time interval assuming segments with fixed radius.
| range | the parametric [0, 1] time interval over which the collision is to be detected. |
| const Math::PolynomialValues< double, 2 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::Q1Q2_P1Q1 | ( | ) | const |
Dot product accessors for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t)
| const Math::PolynomialValues< double, 2 > & SurgSim::Collision::SegmentSegmentCcdIntervalCheck::Q1Q2_sq | ( | ) | const |
Magnitude squared product accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::q1T0 | ( | ) | const |
Endpoint accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::q1T1 | ( | ) | const |
Endpoint accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::q2T0 | ( | ) | const |
Endpoint accessors
| Math::Vector3d SurgSim::Collision::SegmentSegmentCcdIntervalCheck::q2T1 | ( | ) | const |
Endpoint accessors
| void SurgSim::Collision::SegmentSegmentCcdIntervalCheck::setDistanceEpsilon | ( | double | epsilon | ) |
Algorithm epsilons. Set the epsilon values for the various member variables.
| epsilon | the algorithm epsilon parameters for "close enough" decisions. |
| void SurgSim::Collision::SegmentSegmentCcdIntervalCheck::setMuNuEpsilon | ( | double | epsilon | ) |
Algorithm epsilons. Set the epsilon values for the various member variables.
| epsilon | the algorithm epsilon parameters for "close enough" decisions. |
| void SurgSim::Collision::SegmentSegmentCcdIntervalCheck::setTimePrecisionEpsilon | ( | double | epsilon | ) |
Algorithm epsilons. Set the epsilon values for the various member variables.
| epsilon | the algorithm epsilon parameters for "close enough" decisions. |
| void SurgSim::Collision::SegmentSegmentCcdIntervalCheck::setTripleProductEpsilon | ( | double | epsilon | ) |
Algorithm epsilons. Set the epsilon values for the various member variables.
| epsilon | the algorithm epsilon parameters for "close enough" decisions. |
| double SurgSim::Collision::SegmentSegmentCcdIntervalCheck::thicknessP | ( | ) | const |
Thickness accessors
| double SurgSim::Collision::SegmentSegmentCcdIntervalCheck::thicknessQ | ( | ) | const |
Thickness accessors
| double SurgSim::Collision::SegmentSegmentCcdIntervalCheck::timePrecisionEpsilon | ( | ) | const |
Algorithm epsilons
| double SurgSim::Collision::SegmentSegmentCcdIntervalCheck::tripleProductEpsilon | ( | ) | const |
Algorithm epsilons
|
private |
The algorithm epsilon parameters for "close enough" decisions.
|
private |
Linear motion intervals for each of the segment endpoints from t(0) to t(1).
|
private |
Linear motion intervals for each of the segment endpoints from t(0) to t(1).
|
private |
Linear motion intervals for each of the segment endpoints from t(0) to t(1).
|
private |
Linear motion intervals for each of the segment endpoints from t(0) to t(1).
|
private |
The algorithm epsilon parameters for "close enough" decisions.
|
private |
Dot product accessors The dot product for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t)
|
private |
Dot product accessors The dot product for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t)
|
private |
The squared magnitude of the difference operators for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t).
|
private |
The x, y and z components of (P2 - P1) X (Q2 - Q1).
|
private |
The x, y and z components of (P2 - P1) X (Q2 - Q1).
|
private |
The x, y and z components of (P2 - P1) X (Q2 - Q1).
|
private |
The triple product of (Q1(t) - P1(t)) X (P2(t) - P1(t)) X (Q2(t) - Q1(t)) as a 3rd degree polynomial where P1, P2,Q1 and Q2 are time dependent positions for the segment endpoints.
|
private |
Dot product accessors The dot product for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t)
|
private |
The squared magnitude of the difference operators for time dependent vertex positions P1(t), P2(t), Q1(t) and Q2(t).
|
private |
Linear motion intervals for relative endpoint differences (i.e. P1Q1 indicates that the interval encodes Q1 - P1).
|
private |
Linear motion intervals for relative endpoint differences (i.e. P1Q1 indicates that the interval encodes Q1 - P1).
|
private |
Linear motion intervals for relative endpoint differences (i.e. P1Q1 indicates that the interval encodes Q1 - P1).
|
private |
The thickness parameters for P and Q, respectively.
|
private |
The thickness parameters for P and Q, respectively.
|
private |
The algorithm epsilon parameters for "close enough" decisions.
|
private |
The algorithm epsilon parameters for "close enough" decisions.
1.8.13