Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
Track's Foot Point

Foot of a point in space on a track. Finds a point on a track so that the line from it to the target point stands perpendicular on the track's tangent at that point. More...

Functions

dclspc std::pair< bool, Lengthtrax::Foot (const spat::Position< Length > &ofPoint, const Track &toTrack)
 Foot for point in space.
dclspc std::pair< bool, Lengthtrax::Foot (const spat::Position< Length > &ofPoint, const Track &toTrack, Length bestGuess)
dclspc std::pair< bool, Lengthtrax::Foot (const spat::Position< Length > &ofPoint, const Track &toTrack, Length bestGuess, common::Interval< Length > inRange)
dclspc std::pair< bool, Lengthtrax::Foot (const spat::VectorBundle< Length, One > &ofRay, const Track &toTrack)
 Foot for a ray in space.
dclspc std::pair< bool, Lengthtrax::Foot (const spat::VectorBundle< Length, One > &ofRay, const Track &toTrack, Length bestGuess)
dclspc std::pair< bool, Lengthtrax::Foot (const spat::VectorBundle< Length, One > &ofRay, const Track &toTrack, Length bestGuess, common::Interval< Length > inRange)

Detailed Description

Foot of a point in space on a track. Finds a point on a track so that the line from it to the target point stands perpendicular on the track's tangent at that point.

Feets are also locally shortest distanced to the reference point, i.e. the neighbouring points of the curve would be of greater distance to the point. For complex curves the function might not find the foot with the globally shortest distance.

Parameters
ofPointThe point to find the foot of the perpendicular for.
ofRayA ray to find the foot of the perpendicular for. The perpendicular will also be prependicular to the ray.
toTrackThe track to find the foot on.
bestGuessA value of s that might be close to the desired solution.
inRangeA range on the track to limit the search to.
Exceptions
std::invalid_argumentif bestGuess is not inside the tracks range or not inside inRange.
std::runtime_errorif the track is not properly built.
Returns
A pair whiches first element is true if a solution was found. The second element then is the track parameter s for the foot point in question.
Exceptions
std::runtime_errorif the track is not valid.
std::invalid_argumentif bestGuess is out of the valid range.