Simbody
3.7
|
This class stores a geodesic curve after it has been determined. More...
Public Member Functions | |
Geodesic () | |
Construct an empty geodesic. More... | |
int | getNumPoints () const |
const Array_< Transform > & | getFrenetFrames () const |
Frenet frame of geodesic at arc length s: More... | |
Array_< Transform > & | updFrenetFrames () |
void | addFrenetFrame (const Transform &Kf) |
Array_< Real > & | updArcLengths () |
const Array_< Real > & | getArcLengths () const |
void | addArcLength (Real s) |
Array_< Real > & | updCurvatures () |
const Array_< Real > & | getCurvatures () const |
void | addCurvature (Real kappa) |
Array_< Vec2 > & | updDirectionalSensitivityPtoQ () |
const Array_< Vec2 > & | getDirectionalSensitivityPtoQ () const |
void | addDirectionalSensitivityPtoQ (const Vec2 &jP) |
Array_< Vec2 > & | updDirectionalSensitivityQtoP () |
const Array_< Vec2 > & | getDirectionalSensitivityQtoP () const |
void | addDirectionalSensitivityQtoP (const Vec2 &jQ) |
Array_< Vec2 > & | updPositionalSensitivityPtoQ () |
const Array_< Vec2 > & | getPositionalSensitivityPtoQ () const |
void | addPositionalSensitivityPtoQ (const Vec2 &jtP) |
Array_< Vec2 > & | updPositionalSensitivityQtoP () |
const Array_< Vec2 > & | getPositionalSensitivityQtoP () const |
void | addPositionalSensitivityQtoP (const Vec2 &jtQ) |
void | setTorsionAtP (Real tauP) |
void | setTorsionAtQ (Real tauQ) |
void | setBinormalCurvatureAtP (Real muP) |
void | setBinormalCurvatureAtQ (Real muQ) |
Real | getLength () const |
Return the total arc length of this geodesic curve. More... | |
Real | calcLengthDot (const Vec3 &xdotP, const Vec3 &xdotQ) const |
Given the time derivatives of the surface coordinates of P and Q, calculate the rate of change of length of this geodesic. More... | |
const Vec3 & | getPointP () const |
Return the location on the surface of the geodesic's starting point P, measured and expressed in the surface frame S. More... | |
const Vec3 & | getPointQ () const |
Return the location on the surface of the geodesic's ending point Q, measured and expressed in the surface frame S. More... | |
const UnitVec3 & | getNormalP () const |
Return the surface outward unit normal at P, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at P. More... | |
const UnitVec3 & | getNormalQ () const |
Return the surface outward unit normal at Q, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at Q. More... | |
const UnitVec3 & | getTangentP () const |
Return the unit tangent to the geodesic at P, pointing in the direction of increasing arc length parameters (i.e., towards Q). More... | |
const UnitVec3 & | getTangentQ () const |
Return the unit tangent to the geodesic at Q, pointing in the direction of increasing arc length parameters (i.e., away from P). More... | |
const UnitVec3 & | getBinormalP () const |
Return the unit binormal vector to the curve at P, defined as bP = tP X nP. More... | |
const UnitVec3 & | getBinormalQ () const |
Return the unit binormal vector to the curve at Q, defined as bQ = tQ X nQ. More... | |
Real | getCurvatureP () const |
Return the geodesic normal curvature at P, defined to be positive when the surface is convex in the curve tangent direction at P, negative if the surface is concave in that direction. More... | |
Real | getCurvatureQ () const |
Return the geodesic normal curvature at Q, defined to be positive when the surface is convex in the curve tangent direction at Q, negative if the surface is concave in that direction. More... | |
Real | getTorsionP () const |
Return the geodesic torsion at P, that is, the twisting of the Frenet frame as you move along the tangent towards Q. More... | |
Real | getTorsionQ () const |
Return the geodesic torsion at Q, that is, the twisting of the Frenet frame as you move along the tangent away from P, that is, off the end of the geodesic. More... | |
Real | getBinormalCurvatureP () const |
Return the surface curvature in the binormal direction at P; don't confuse this with the geodesic torsion at P. More... | |
Real | getBinormalCurvatureQ () const |
Return the surface curvature in the binormal direction at Q; don't confuse this with the geodesic torsion at Q. More... | |
Real | getJacobiP () const |
Return jP, the Jacobi field term giving the sensitivity of the P end of the geodesic to changes in tangent direction at the Q end, assuming the geodesic length is fixed. More... | |
Real | getJacobiQ () const |
Return jQ, the Jacobi field term giving the sensitivity of the Q end of the geodesic to changes in tangent direction at the P end, assuming the geodesic length is fixed. More... | |
Real | getJacobiPDot () const |
Return the derivative of jP with respect to s, the arc length of the geodesic (which always runs from P to Q). More... | |
Real | getJacobiQDot () const |
Return the derivative of jQ with respect to s, the arc length of the geodesic. More... | |
Real | getJacobiTransP () const |
Real | getJacobiTransQ () const |
Real | getJacobiTransPDot () const |
Real | getJacobiTransQDot () const |
void | clear () |
Clear the data in this geodesic, returning it to its default-constructed state, although memory remains allocated. More... | |
void | setIsConvex (bool isConvex) |
void | setIsShortest (bool isShortest) |
void | setInitialStepSizeHint (Real sz) |
void | setAchievedAccuracy (Real acc) |
bool | isConvex () const |
bool | isShortest () const |
Real | getInitialStepSizeHint () const |
Real | getAchievedAccuracy () const |
void | dump (std::ostream &o) const |
This class stores a geodesic curve after it has been determined.
The curve is represented by a discrete set of Frenet frames along its arc length, with each frame providing a point on the curve, the tangent along the curve there, surface normal, and binormal. The number of points is determined by the accuracy to which the geodesic was calculated and the complexity of the surface. For analytical geodesics, we'll sample the curve to generate enough points for visualization but the accuracy will be machine precision. The first point is at arclength s=0, the last is at the actual length of the geodesic. We call the first point P and the last point Q, and the geodesic arc length increases from P to Q, with the tangent always pointing in the direction of increasing arc length.
|
inline |
Construct an empty geodesic.
|
inline |
Frenet frame of geodesic at arc length s:
Note that this convention is different from that of a curve, because our normal vector always points outwards from the surface.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return the total arc length of this geodesic curve.
Will return zero if no curve has been calculated.
Given the time derivatives of the surface coordinates of P and Q, calculate the rate of change of length of this geodesic.
Only the components of xdotP and xdotQ along the curve tangent directions can affect its length; moves in the normal or binormal direction leave the length unchanged.
|
inline |
Return the location on the surface of the geodesic's starting point P, measured and expressed in the surface frame S.
|
inline |
Return the location on the surface of the geodesic's ending point Q, measured and expressed in the surface frame S.
|
inline |
Return the surface outward unit normal at P, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at P.
|
inline |
Return the surface outward unit normal at Q, which is aligned with the curve normal there but will have opposite sign if the geodesic curvature is positive at Q.
|
inline |
Return the unit tangent to the geodesic at P, pointing in the direction of increasing arc length parameters (i.e., towards Q).
|
inline |
Return the unit tangent to the geodesic at Q, pointing in the direction of increasing arc length parameters (i.e., away from P).
|
inline |
Return the unit binormal vector to the curve at P, defined as bP = tP X nP.
|
inline |
Return the unit binormal vector to the curve at Q, defined as bQ = tQ X nQ.
|
inline |
Return the geodesic normal curvature at P, defined to be positive when the surface is convex in the curve tangent direction at P, negative if the surface is concave in that direction.
This is a scalar kappaP=-dot(DtP/ds,nP). Note that the geodesic curvature is the same as the surface curvature in the curve tangent direction.
|
inline |
Return the geodesic normal curvature at Q, defined to be positive when the surface is convex in the curve tangent direction at Q, negative if the surface is concave in that direction.
This is a scalar kappaQ=-dot(DtQ/ds,nQ). Note that the geodesic curvature is the same as the surface curvature in the curve tangent direction, and remember that the curve tangent at Q points away from P, that is, off the end of the geodesic.
|
inline |
Return the geodesic torsion at P, that is, the twisting of the Frenet frame as you move along the tangent towards Q.
The sign follows the right hand rule with your thumb directed along the tangent. This is a scalar tauP=-dot(DbP/Ds,nP).
|
inline |
Return the geodesic torsion at Q, that is, the twisting of the Frenet frame as you move along the tangent away from P, that is, off the end of the geodesic.
The sign follows the right hand rule with your thumb directed along the tangent. This is a scalar tauQ=-dot(DbQ/Ds,nQ).
|
inline |
Return the surface curvature in the binormal direction at P; don't confuse this with the geodesic torsion at P.
Surface curvature in a direction is a property of the surface independent of any curve.
|
inline |
Return the surface curvature in the binormal direction at Q; don't confuse this with the geodesic torsion at Q.
Surface curvature in a direction is a property of the surface independent of any curve.
|
inline |
Return jP, the Jacobi field term giving the sensitivity of the P end of the geodesic to changes in tangent direction at the Q end, assuming the geodesic length is fixed.
This is a scalar jP=dot(DP/DthetaQ,bP) where thetaQ is a right-hand-rule rotation about the normal nQ at Q. Caution: jP and jQ have opposite signs.
|
inline |
Return jQ, the Jacobi field term giving the sensitivity of the Q end of the geodesic to changes in tangent direction at the P end, assuming the geodesic length is fixed.
This is a scalar jQ=-dot(DQ/DthetaP,bQ) where thetaP is a right-hand-rule rotation about the normal nP at P. Note that jQ has the opposite sign from jP.
|
inline |
Return the derivative of jP with respect to s, the arc length of the geodesic (which always runs from P to Q).
That is jPDot = d/ds jP.
|
inline |
Return the derivative of jQ with respect to s, the arc length of the geodesic.
That is, jQDot = d/ds jQ.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Clear the data in this geodesic, returning it to its default-constructed state, although memory remains allocated.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void SimTK::Geodesic::dump | ( | std::ostream & | o | ) | const |