#include <sch/CD/CD_Pair.h>
|
SCH_API | CD_Pair (S_Object *Obj1, S_Object *Obj2) |
| constructor \IMPORTANT: to create a CD::Pair, two CD::S_Objects must have been created before, these objects moust not be destroyed before this instance More...
|
|
virtual SCH_API | ~CD_Pair (void) |
|
SCH_API Scalar | getClosestPoints (Point3 &p1, Point3 &p2) |
| function that returns the distance SQUARED between two convex objects, and computes the witness points, the distance is set to negative if interpentration More...
|
|
SCH_API Scalar | reComputeClosestPoints (Point3 &p1, Point3 &p2) |
| function that returns the distance SQUARED between two convex objects, restarting the computations from the beginning and computes the witness points, the distance is set to negative if interpentration More...
|
|
SCH_API Scalar | getDistance () |
| function that returns the distance SQUARED between two convex objects, the distance is set to negative if interpentration More...
|
|
SCH_API Scalar | getDistanceWithoutPenetrationDepth () |
| function that returns the distance SQUARED between two convex objects, no interpenetration depth computations done the distance is set to zero in this case More...
|
|
SCH_API bool | isInCollision () |
| returns if there is collision or not. If the distance is not already computed, it does not recompute, just returns the result. More...
|
|
SCH_API void | setVector (const Vector3 &) |
| Intializes the direction vector (the vector between expected closest points) with a given value. More...
|
|
const SCH_API Vector3 & | getVector () const |
| Gets the last direction vector (can be used to get a normal vector, especially when the distance is zero). This vector is likely NOT normalized. More...
|
|
SCH_API void | setRelativePrecision (Scalar precision) |
| sets the relative precision of the proximity queries to a given value. The effective precision is precision^2 . Default is precision=1e-3. More...
|
|
SCH_API void | setEpsilon (Scalar) |
| Sets the machine epsilon. Default is 1e-24. More...
|
|
SCH_API S_Object * | operator[] (unsigned char i) |
| returns a pointer to the ith object in the pair More...
|
|
◆ CD_Pair()
constructor \IMPORTANT: to create a CD::Pair, two CD::S_Objects must have been created before, these objects moust not be destroyed before this instance
- Parameters
-
Obj1 | is a pointer to the first object |
Obj1 | is a pointer to the second object |
◆ ~CD_Pair()
virtual SCH_API sch::CD_Pair::~CD_Pair |
( |
void |
| ) |
|
|
virtual |
◆ getClosestPoints()
function that returns the distance SQUARED between two convex objects, and computes the witness points, the distance is set to negative if interpentration
The witness points are on the surface of the objects with opposite normals. If there is a collision and the penetration depth computation is deactivated then the witness points will only reflect the last step of the distance computation algorithm. Otherwise the witness points are points each on the surface of the other, having opposite normals and being the closest each to the other. In any case the returned distance should be used to obtain the distance.
- Parameters
-
p1 | is the witness point on the first object |
p2 | is the witness point on the second object |
- Returns
- the distance squared (set to negative when there is penetration)
- Examples
- example0.cpp.
◆ getDistance()
function that returns the distance SQUARED between two convex objects, the distance is set to negative if interpentration
- Examples
- example0.cpp.
◆ getDistanceWithoutPenetrationDepth()
SCH_API Scalar sch::CD_Pair::getDistanceWithoutPenetrationDepth |
( |
| ) |
|
function that returns the distance SQUARED between two convex objects, no interpenetration depth computations done the distance is set to zero in this case
- Examples
- example0.cpp, and example1.cpp.
◆ getVector()
Gets the last direction vector (can be used to get a normal vector, especially when the distance is zero). This vector is likely NOT normalized.
◆ GJK()
◆ isInCollision()
SCH_API bool sch::CD_Pair::isInCollision |
( |
| ) |
|
returns if there is collision or not. If the distance is not already computed, it does not recompute, just returns the result.
- Examples
- example0.cpp.
◆ operator[]()
returns a pointer to the ith object in the pair
◆ penetrationDepth()
Scalar sch::CD_Pair::penetrationDepth |
( |
| ) |
|
|
protected |
◆ reComputeClosestPoints()
function that returns the distance SQUARED between two convex objects, restarting the computations from the beginning and computes the witness points, the distance is set to negative if interpentration
- Parameters
-
p1 | is the witness point on the first object |
p2 | is the witness point on the second object |
◆ setEpsilon()
Sets the machine epsilon. Default is 1e-24.
◆ setRelativePrecision()
SCH_API void sch::CD_Pair::setRelativePrecision |
( |
Scalar |
precision | ) |
|
sets the relative precision of the proximity queries to a given value. The effective precision is precision^2 . Default is precision=1e-3.
◆ setVector()
Intializes the direction vector (the vector between expected closest points) with a given value.
◆ witPoints()
◆ collision_
bool sch::CD_Pair::collision_ |
|
protected |
◆ depthPair
◆ det_
◆ distance_
Scalar sch::CD_Pair::distance_ |
|
protected |
◆ epsilon_
◆ lambda0_
◆ lambda1_
◆ lambda2_
◆ lastDirection_
Vector3 sch::CD_Pair::lastDirection_ |
|
protected |
◆ lastFeature1_
int sch::CD_Pair::lastFeature1_ |
|
protected |
◆ lastFeature2_
int sch::CD_Pair::lastFeature2_ |
|
protected |
◆ p1_
◆ p2_
◆ precision_
Scalar sch::CD_Pair::precision_ |
|
protected |
◆ projectionComputed_
bool sch::CD_Pair::projectionComputed_ |
|
protected |
◆ s1_
◆ s2_
◆ s_
◆ sObj1_
◆ sObj2_
◆ sp_
◆ stamp1_
◆ stamp2_
◆ witPointsAreComputed_
bool sch::CD_Pair::witPointsAreComputed_ |
|
protected |
The documentation for this class was generated from the following file: