![]() |
Trax3 3.1.0
trax track library
|
A curve given by Fi,ki,ti,si samples of a real curveT. More...
#include <C:/Trend/Development/Trax3/Code/trax/Curve.h>

Public Types | |
| using | Data = std::vector<CurveSample> |
| Public Types inherited from trax::Curve | |
| enum class | CurveType { none = 0 , Line , Arc , Helix , LineP , ArcP , HelixP , Clothoid , Cubic , Spline , Rotator , RotatorWithOffset , RotatorChain , PolygonalChain , SampledCurve , Parallel , EEPCurve , EEPResidual , EEPAlternative , Unknown , UserDefined } |
| Curve type identification values. More... | |
Public Member Functions | |
| virtual int | UpperBound (Length s) const =0 |
| The index of the sample that is the first one to have greater parameter than s. | |
| virtual const Data & | GetData () const noexcept=0 |
| Retrieves the data to construct this curve type. A roundtrip is guaranteed to be invariant. | |
Creation | |
| virtual common::Interval< Length > | Create (const Curve &originalCurve, common::Interval< Length > range, Length maxDeviationLength=epsilon__length, Angle maxDeviationAngle=epsilon__angle, common::Interval< Length > sampleDistanceLimits={ epsilon__length, 20_m })=0 |
| Creates a sampled curve from an existing curve. | |
| virtual common::Interval< Length > | Create (std::pair< std::shared_ptr< const Curve >, common::Interval< Length > > originalCurve, Length maxDeviationLength=epsilon__length, Angle maxDeviationAngle=epsilon__angle, common::Interval< Length > sampleDistanceLimits={ epsilon__length, 20_m })=0 |
| virtual common::Interval< Length > | Create (const Data &data)=0 |
| Create the curve from data set for which it is guaranteed, that no calculational drift will happen e.g. in write/read cycles. | |
| Public Member Functions inherited from trax::Curve | |
| virtual const char * | TypeName () const noexcept=0 |
| virtual CurveType | GetCurveType () const noexcept=0 |
| virtual bool | IsValid () const noexcept=0 |
| virtual AnglePerLength | Curvature (Length s) const =0 |
| virtual AnglePerLength | Torsion (Length s) const =0 |
| virtual bool | IsFlat () const noexcept=0 |
| virtual void | Transition (Length s, spat::Position< Length > &pos) const =0 |
| Copies the 3D Position at the specified location to pos. | |
| virtual void | Transition (Length s, spat::Vector< One > &tan) const =0 |
| Copies the 3D tangential vector at the specified location to tan. | |
| virtual void | Transition (Length s, spat::VectorBundle< Length, One > &bundle) const =0 |
| Copies the 3D Position and tangential vector at the specified location to bundle. | |
| virtual void | Transition (Length s, spat::VectorBundle2< Length, One > &bundle) const =0 |
| Copies the 3D Position and tangential and normal vectors at the specified location to bundle. | |
| virtual void | Transition (Length s, spat::Frame< Length, One > &frame) const =0 |
| Copies the 3D TBN-Frame at the specified location to frame. | |
| virtual std::vector< Length > | ZeroSet () const =0 |
| Returns a list of parameters at which the normal vector flips from one side to the other. | |
| virtual common::Interval< Length > | Range () const =0 |
| virtual spat::Vector< One > | LocalUp () const =0 |
| Gives the Curve's idiosyncratic up direction. Some curves maintain some idea about where they have their upside, either because of their form (e.g Helix) or because it is extra defined (e.g. for Line). Some curves maintain no such notion (e.g. many Cubics). | |
| virtual spat::Frame< Length, One > | GetCurveLocalTransformation () const =0 |
| virtual std::unique_ptr< Curve > | Clone () const =0 |
| make an exact copy of this curve. | |
| virtual bool | Mirror (const spat::VectorBundle< Length, One > &mirrorPlane)=0 |
| Make a Curve with mirrored geometry (but of course one thet returns right handed frames). | |
| virtual bool | Equals (const Curve &toCurve, common::Interval< Length > range, Length epsilon_length=epsilon__length, Angle epsilon_angle=epsilon__angle) const =0 |
| Comparison. | |
| Curve (Curve &&)=delete | |
| Curve & | operator= (const Curve &)=delete |
| Curve & | operator= (Curve &&)=delete |
Static Public Member Functions | |
| static dclspc std::unique_ptr< SampledCurve > | Make () noexcept |
| Makes a SampledCurve object. | |
Additional Inherited Members | |
| Protected Member Functions inherited from trax::Curve | |
| Curve (const Curve &)=default | |
A curve given by Fi,ki,ti,si samples of a real curveT.
The intermediate values k(s), t(s) are linearly interpolated and from them the F(s) are integrated following the Frenet differential equations. If the sample is not taken from a 'real' curve or are too far distant the segments will not be continuous.
If only some points (and maybe tangents) along a curve are known, use PolygonalChain or Spline.
|
pure virtual |
Creates a sampled curve from an existing curve.
| originalCurve | valid template curve. |
| range | range on the curve |
| maxDeviationLength | the maximum spacial deviation, so that the sample curve is nowhere farther away from the original. |
| maxDeviationAngle | the maximum angular deviation. |
| sampleDistanceLimits | the minimum and maximum distance of consecutive points. |
| std::invalid_argument | if originalCurve is not a valid curve, or the range of the curve does not intersect with range or maxDeviation <= 0_m. |
|
pure virtual |
Create the curve from data set for which it is guaranteed, that no calculational drift will happen e.g. in write/read cycles.
| std::invalid_argument | if data.size() < 2 or data.size() == 2 and the two points are the same. |
| std::invalid_argument | if the curve can not created from the input values. |
|
pure virtual |
| originalCurve | valid template curve. |
| maxDeviationLength | the maximum spacial deviation, so that the sample curve |
| maxDeviationAngle | the maximum angular deviation. |
| sampleDistanceLimits | the minimum and maximum distance of consecutive points. |
| std::invalid_argument | if originalCurve is not a valid curve, or the range of the curve does not intersect with range or maxDeviation <= 0_m. |
|
pure virtual |
The index of the sample that is the first one to have greater parameter than s.
The index might become greater than GetData().size() - 1, in what case s is beyond the curves range.