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

A three dimensional spiral with owned parameters. More...

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

Inheritance diagram for trax::HelixP:

Classes

struct  Data
 Data definig the curve. More...

Public Member Functions

virtual spat::VectorBundle2< Length, OneCenter () const noexcept=0
virtual Length Radius () const noexcept=0
virtual One Slope () const noexcept=0
virtual spat::SquareMatrix< One, 3 > Jacobian (Length s) const =0
 Returns the partial derivatives of the position P to the parameters a, b and 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::Frame< Length, One > &start, AnglePerLength curvature, AnglePerLength torsion)=0
 Create the Helix.
virtual common::Interval< LengthCreate (const spat::VectorBundle< Length, One > &start, const spat::Position< Length > &end, const spat::Vector< One > &up=Up, Angle e_angle=epsilon__angle)=0
 Create an upright Helix from start to end.
virtual common::Interval< LengthCreate (const spat::Position< Length > &start, const spat::VectorBundle< Length, One > &end, const spat::Vector< One > &up=Up, Angle e_angle=epsilon__angle)=0
virtual void Create (const spat::VectorBundle2< Length, One > &center, AnglePerLength curvature, AnglePerLength torsion)=0
 Create the Helix.
virtual common::Interval< LengthCreate (const Data &data)=0
 Create the Helix from data set for wich 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< HelixPMake () noexcept
 Makes a HelixP 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 three dimensional spiral with owned parameters.

Try to use 'Helix' 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.

/// k                   : curvature
/// t                   : torsion
/// a                   : radius
/// b/a == tan(alpha)   : slope
///
///         { a*cos( s/sqrt(a²+b²) ) }
/// P(s) =  { a*sin( s/sqrt(a²+b²) ) }
///         { b*s/sqrt(a²+b²)        }
///
/// k = a / (a² + b²)
/// t = b / (a² + b²)
/// a = k / (k² + t²)
/// b = t / (k² + t²)
/// 

Member Function Documentation

◆ Center()

virtual spat::VectorBundle2< Length, One > trax::HelixP::Center ( ) const
pure virtualnoexcept
Returns
The center around wich the spiral turns. The T vector points to the spiral at parameter 0.

◆ Create() [1/5]

virtual common::Interval< Length > trax::HelixP::Create ( const Data & data)
pure virtual

Create the Helix from data set for wich 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/5]

virtual void trax::HelixP::Create ( const spat::Frame< Length, One > & start,
AnglePerLength curvature,
AnglePerLength torsion )
pure virtual

Create the Helix.

Parameters
startStarting point with tangent, normal and binormal directions.
curvatureConstant curvature of the Helix. Keep in mind that the radius of the helix is r = k / (k² + t²), not 1/k.
torsionConstant torsion (winding) of the helix.
Exceptions
std::invalid_argumentif curvature <= 0.

◆ Create() [3/5]

virtual common::Interval< Length > trax::HelixP::Create ( const spat::Position< Length > & start,
const spat::VectorBundle< Length, One > & end,
const spat::Vector< One > & up = Up,
Angle e_angle = epsilon__angle )
pure virtual
Parameters
startStarting point with starting direction perpendicular to Up.
endEnd point of helix.
upUp direction.
e_anglethe total angle of the arc that would be too small, so creation fails.
Returns
the range along the curve from start to end.
Exceptions
std::invalid_argumentif a helix can not get calculated from input values, e.g. the two points are too near or the start.T points directly to end.

◆ Create() [4/5]

virtual void trax::HelixP::Create ( const spat::VectorBundle2< Length, One > & center,
AnglePerLength curvature,
AnglePerLength torsion )
pure virtual

Create the Helix.

Parameters
centerCenter point of the helix. center.T points to starting point of the helix at s=0.
curvatureConstant curvature of the Helix. Keep in mind that the radius of the helix is r = c / (c² + t²), not 1/c.
torsionConstant torsion (winding) of the helix.
Exceptions
std::invalid_argumentif curvature <= 0.

◆ Create() [5/5]

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

Create an upright Helix from start to end.

Parameters
startStarting point with starting direction perpendicular to Up.
endEnd point of helix.
upUp direction.
e_anglethe total angle of the arc that would be too small, so creation fails.
Returns
the range along the curve from start to end.
Exceptions
std::invalid_argumentif a helix can not get calculated from input values, e.g. the two points are too near or the start.T points directly to end.

◆ Jacobian()

virtual spat::SquareMatrix< One, 3 > trax::HelixP::Jacobian ( Length s) const
pure virtual

Returns the partial derivatives of the position P to the parameters a, b and s in a matrix, customly called a 'Jacobian matrix'.

For calculation

See also
Helix::Jacobian.
Parameters
sparameter to evaluate the derivatives.
Returns
dP/da, dP/db and dP/ds will make up the 0th, 1st and 2nd column of the matrix.
Exceptions
std::bad_allocon memory exhaustion.

◆ Radius()

virtual Length trax::HelixP::Radius ( ) const
pure virtualnoexcept
Returns
Radius of helix, same as value a.

◆ Slope()

virtual One trax::HelixP::Slope ( ) const
pure virtualnoexcept
Returns
Tangens of inclination angle, being: b/a.

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