Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::ArcP Struct Referenceabstract

A plane arc with owned parameters. More...

#include <C:/Trend/Development/Trax3/Code/trax/Curve.h>

Inheritance diagram for trax::ArcP:

Classes

struct  Data
 Data definig the curve. More...

Public Member Functions

virtual Length Radius () const noexcept=0
virtual spat::Matrix< One, 2, 3 > Jacobian (Length s) const =0
 Returns the partial derivatives of the position P-C to the curve radius r and parameter s in a matrix, customly called a 'Jacobian matrix'.
virtual const DataGetData () const noexcept=0
 Retrieves the data to construct this curve type. A roundtrip is guaranteed to be invariant.
Creation
virtual void Create (const spat::VectorBundle2< Length, One > &center)=0
 Creates an Arc.
virtual common::Interval< LengthCreate (const spat::VectorBundle< Length, One > &start, const spat::Position< Length > &end, Angle e_angle=epsilon__angle)=0
 Creates an Arc from its starting and ending points.
virtual common::Interval< LengthCreate (const spat::Position< Length > &start, const spat::VectorBundle< Length, One > &end, Angle e_angle=epsilon__angle)=0
 Creates an Arc from its starting and ending points.
virtual void Create (const spat::Position< Length > &start, const spat::Vector< One > &tan, const spat::Vector< One > &nor, AnglePerLength curvature)=0
 Creates an Arc from its curvature.
virtual void Create (const spat::VectorBundle2< Length, One > &start, AnglePerLength curvature)=0
 Creates an Arc from curvature.
virtual common::Interval< LengthCreate (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< LengthZeroSet () const =0
 Returns a list of parameters at which the normal vector flips from one side to the other.
virtual common::Interval< LengthRange () const =0
virtual spat::Vector< OneLocalUp () 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, OneGetCurveLocalTransformation () 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< ArcPMake () noexcept
 Makes a ArcP object.

Additional Inherited Members

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...
Protected Member Functions inherited from trax::Curve
 Curve (const Curve &)=default

Detailed Description

A plane arc with owned parameters.

Try to use 'Arc' instead. Only use this curve with redundant parameters if you really need it; for example to position a curve independently from the track's frame, or you want to use the create methods on a curve directly.

/// t: tangent
/// n: normal
/// k: curvature
/// r: curve radius
/// c: center point
///
/// P(s) = C + r * (sin(k*s) * t - cos(k*s) * n);
/// 

Member Function Documentation

◆ Create() [1/6]

virtual common::Interval< Length > trax::ArcP::Create ( const Data & data)
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.

Exceptions
std::invalid_argumentif the curve can not created from the input values.

◆ Create() [2/6]

virtual void trax::ArcP::Create ( const spat::Position< Length > & start,
const spat::Vector< One > & tan,
const spat::Vector< One > & nor,
AnglePerLength curvature )
pure virtual

Creates an Arc from its curvature.

Parameters
startStarting point of the arc.
tanTangent at the arc at starting point.
norNormal direction at starting point.
curvatureCurvature of the curve i.e. 1 / Curve Radius.
Exceptions
std::invalid_argumentif the curve can not created from the input values.

◆ Create() [3/6]

virtual common::Interval< Length > trax::ArcP::Create ( const spat::Position< Length > & start,
const spat::VectorBundle< Length, One > & end,
Angle e_angle = epsilon__angle )
pure virtual

Creates an Arc from its starting and ending points.

Parameters
startStarting point and tangent at starting point of the arc.
endEnding point and tangent of the arc. I.e. the last point on the curve.
e_anglethe total angle of the arc that would be too small, so creation fails.
Returns
The total curve range between start and end
Exceptions
std::invalid_argumentif the curve can not created from the input values.

◆ Create() [4/6]

virtual void trax::ArcP::Create ( const spat::VectorBundle2< Length, One > & center)
pure virtual

Creates an Arc.

The center point of the arc lies in center.pos; center.tan is the tangent at the starting point, center.nor the normal with the curve radius as its length.

Parameters
centerGives the geometry of the arc.
Exceptions
std::invalid_argumentif the curve can not created from the input values.

◆ Create() [5/6]

virtual void trax::ArcP::Create ( const spat::VectorBundle2< Length, One > & start,
AnglePerLength curvature )
pure virtual

Creates an Arc from curvature.

Parameters
startStarting point, tangent and normal direction of the arc.
curvatureCurvature of the curve i.e. 1 / Curve Radius.
Exceptions
std::invalid_argumentif the curve can not created from the input values.

◆ Create() [6/6]

virtual common::Interval< Length > trax::ArcP::Create ( const spat::VectorBundle< Length, One > & start,
const spat::Position< Length > & end,
Angle e_angle = epsilon__angle )
pure virtual

Creates an Arc from its starting and ending points.

Parameters
startStarting point and tangent at starting point of the arc.
endEnding point and tangent of the arc. I.e. the last point on the curve.
e_anglethe total angle of the arc that would be too small, so creation fails.
Returns
The total curve range between start and end
Exceptions
std::invalid_argumentif the curve can not created from the input values.

◆ Jacobian()

virtual spat::Matrix< One, 2, 3 > trax::ArcP::Jacobian ( Length s) const
pure virtual

Returns the partial derivatives of the position P-C to the curve radius r and parameter s in a matrix, customly called a 'Jacobian matrix'.

For calculation

See also
HelixP::Jacobian. The values are understood relative to the starting point at the curve (which technically would move, too).
Parameters
sparameter to evaluate the derivatives.
Returns
d(P-C)/dr and dP/ds will make up the 0th and 1st column of the matrix.
Exceptions
std::bad_allocon memory exhaustion.

◆ Radius()

virtual Length trax::ArcP::Radius ( ) const
pure virtualnoexcept
Returns
the Arc's radius

The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/Curve.h