#[non_exhaustive]pub enum StationCurve<'c> {
Two(&'c Curve2),
Three(&'c Curve3),
Offset(StationOffset<'c>),
}Expand description
The atomic curve under a StationPiece.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Two(&'c Curve2)
A 2D curve, lying in z = 0.
Three(&'c Curve3)
A 3D curve.
Offset(StationOffset<'c>)
An offset of a base piece, measured in its own length (#289; see the offset module).
Implementations§
Source§impl<'c> StationCurve<'c>
impl<'c> StationCurve<'c>
Sourcepub fn from_path_curve(
curve: &'c PathCurve,
) -> Result<StationCurve<'c>, GeomError>
pub fn from_path_curve( curve: &'c PathCurve, ) -> Result<StationCurve<'c>, GeomError>
The station curve of a path piece’s curve, borrowed from it.
§Errors
A piece kind this evaluator does not know, by name.
Source§impl StationCurve<'_>
impl StationCurve<'_>
Sourcepub fn convention(self) -> DistanceConvention
pub fn convention(self) -> DistanceConvention
The distance convention a station on this curve is measured in: plan distance on an elevated or banked curve, arc length on every other (a 2D curve’s arc length is its plan length). An offset is measured as its base is (#289).
Sourcepub fn parameter_at_bound(self, bound: PathBound) -> Result<f64, GeomError>
pub fn parameter_at_bound(self, bound: PathBound) -> Result<f64, GeomError>
The native parameter a path piece bound names on the curve (#304): a parameter as it is, a point the one parameter naming it (see the path-bound module).
§Errors
A bound that is not finite; a point off the curve, named by several parameters, or on a curve this evaluator does not invert; each by name.
Trait Implementations§
Source§impl<'c> Clone for StationCurve<'c>
impl<'c> Clone for StationCurve<'c>
Source§fn clone(&self) -> StationCurve<'c>
fn clone(&self) -> StationCurve<'c>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more