#include <rdPointConstraint.h>
Public Member Functions | |
| virtual | ~rdPointConstraint () |
| Destructor. | |
| rdPointConstraint (int aID=0) | |
| Constructor. | |
| rdPointConstraint (double aP[3], double aV[3], double aC0[3], double aC1[3], double aC2[3], int aID=0) | |
| Constructor. | |
| int | getNC () |
| Get the number of non-zero constraint directions. | |
| void | setID (int aID) |
| Set the ID of the point constraint. | |
| int | getID () |
| Get the ID of the point. | |
| void | setPoint (double aP[3]) |
| Set the value of the point. | |
| void | setPoint (double aP0, double aP1, double aP2) |
| Set the value of the point. | |
| void | getPoint (double aP[3]) |
| Get the value of the point. | |
| double * | getPoint () |
| Get the value of the point. | |
| void | setValue (double aP[3]) |
| Set the value of the constraint. | |
| void | setValue (double aP0, double aP1, double aP2) |
| Set the value of the constraint. | |
| void | getValue (double aP[3]) |
| Get the value of the constraint. | |
| double * | getValue () |
| Get the value of the constraint. | |
| void | setC0 (double aC[3]) |
| Set constraint direction 0. | |
| void | setC0 (double aC0, double aC1, double aC2) |
| Set constraint direction 0. | |
| void | getC0 (double *aC) |
| double * | getC0 () |
| Get the constraint direction. | |
| void | setC1 (double aC[3]) |
| Set the constraint direction. | |
| void | setC1 (double aC0, double aC1, double aC2) |
| Set the constraint direction. | |
| void | getC1 (double *aC) |
| double * | getC1 () |
| Get the constraint direction. | |
| void | setC2 (double aC[3]) |
| Set the constraint direction. | |
| void | setC2 (double aC0, double aC1, double aC2) |
| Set the constraint direction. | |
| void | getC2 (double *aC) |
| double * | getC2 () |
| Get the constraint direction. | |
| double | evaluateC0 (double aV[3]) |
| Evaluate the point constraint in direction C0. | |
| double | evaluateC1 (double aV[3]) |
| Evaluate the point constraint in direction C1. | |
| double | evaluateC2 (double aV[3]) |
| Evaluate the point constraint in direction C2. | |
| void | constructOrthoNormalConstraints (double aV[3], double aC0[3]) |
| Construct a set of orthonormal constraint directions based on a provided vector and C0 such that C0 = C0/|C0|, C1 = (aV x aC0)/|aV|, and C2 = C0 x C1. | |
| void | constructOrthoNormalC1 (double aV[3]) |
| Construct constraint direction C1 so that it is normal and orthogonal to C0 and a specified vector acording to C1 = (aV x aC0) / (|aV|*|aC0|). | |
| void | constructOrthoNormalC2 () |
| Construct constraint direction C2 so that it is normal and orthogonal to C0 and C1. | |
| void | normalizeConstraints () |
| Normalize all three constraint directions. | |
| void | zeroConstraints () |
| Zero all three constraint directions. | |
| void | clear () |
| Clear this point constraint. | |
Public Attributes | |
| int | _id |
| double | _p [3] |
| double | _v [3] |
| double | _c0 [3] |
| double | _c1 [3] |
| double | _c2 [3] |
The class supports constraining a point in up to 3 non-parallel directions.
Normally it is best to specify constraint directions as unit vectors; however, it is also allowable for the constraint direction vectors to have any magnitude. The magnitude acts a weight. When the magnitude of a constraint direction vector is 0.0 there is essentially no constraint on the point specified by that constraint direction vector.
|
|
Clear this point constraint. The ID is set to 0, the point is set to the zero vector, and all constraint directions are set to the zero vector. |
|
|
Construct constraint direction C1 so that it is normal and orthogonal to C0 and a specified vector acording to C1 = (aV x aC0) / (|aV|*|aC0|). If either aV or C0 are not valid, C1 is set to a zero vector.
|
|
|
Construct constraint direction C2 so that it is normal and orthogonal to C0 and C1. Note that if C0 or C1 are parallel or if either has zero magnitude, C2 will be set to the zero vector. |
|
||||||||||||
|
Construct a set of orthonormal constraint directions based on a provided vector and C0 such that C0 = C0/|C0|, C1 = (aV x aC0)/|aV|, and C2 = C0 x C1. If any vector cannot be constructed validly, it is set to the zero vector.
|
|
|
Evaluate the point constraint in direction C0.
|
|
|
Evaluate the point constraint in direction C1.
|
|
|
Evaluate the point constraint in direction C2.
|
|
|
Get the ID of the point.
|
|
|
Get the number of non-zero constraint directions.
|
|
|
Set the ID of the point constraint.
|
1.3