|
|
virtual spat::Vector< Length > | CubicOvershootAt (Length s) const noexcept=0 |
| | Gets the first derivative (with respect to the internal parameter u) of the Cubic function at arc length s. Note that you can not use this vector to create a shortened Cubic. Use Shorten() and/or the Data::CubicOvershootAt() methods instead.
|
| virtual common::Interval< Length > | Shorten (common::Interval< Length > toRange)=0 |
| | Transforms the Cubic to one with the given parameter range.
|
|
virtual const Data & | GetData () const noexcept=0 |
| | Retrieves the data to construct this curve type. A roundtrip is guaranteed to be invariant.
|
| virtual common::Interval< Length > | Create (const spat::VectorBundle< Length, Length > &start, const spat::VectorBundle< Length, Length > &end)=0 |
| | Create the Cubic.
|
| virtual common::Interval< Length > | CreateBezier (const spat::Position< Length > &P0, const spat::Position< Length > &P1, const spat::Position< Length > &P2, const spat::Position< Length > &P3)=0 |
| | Cubic from Cubic Bezier control points.
|
| virtual std::pair< common::Interval< Length >, Length > | Create (const Curve &originalCurve, common::Interval< Length > range, Length maxDeviation=epsilon__length)=0 |
| | Create the Cubic as approximation of an original curve.
|
| virtual common::Interval< Length > | Create (const Data &data)=0 |
| | Create the Cubic from data set for wich it is guaranteed, that no calculational drift will happen e.g. in write/read cycles.
|
| 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 |
Cubic polynom curve.
The cubic polynom: p(u) = a + b*u + c*u² + d*u³ in general has one solution for the boundary value problem that the starting and ending point and tangents are fixed. It goes like this:
/// u: parameter running from 0 to 1
/// p1,t1: starting point and tangent.
/// p2,t2: ending point and tangent.
/// p(u) = a + b*u + c*u² + d*u³: cubic equation.
/// t(u) = b + 2*c*u + 3*d*u²: first derivative of cubic equation.
///
/// p1 = p(0) = a (1)
/// p2 = p(1) = a + b + c + d (2)
/// t1 = t(0) = b (3)
/// t2 = t(1) = b + 2c + 3d (4)
///
/// (4)-3*(2) => t2-3p2 = -3a - 2b - c
/// => c = 3p2 -t2 - 3a - 2b
/// => c = 3p2 -t2 - 3p1 - 2t1 (1),(3)
/// (2) => d = p2 - p1 - t1 - (3p2 -t2 - 3p1 - 2t1)
/// => = 2p1 + t1 - 2p2 + t2
///
The above curve will get parametrized by its arc length.