pub struct ReferenceCurveEvaluator { /* private fields */ }Expand description
Reference curve evaluator.
up is the reference direction the oriented frame is built against.
It is carried by the provider rather than passed per call so that one
consumer cannot silently place two objects against different
conventions on the same alignment.
Implementations§
Source§impl ReferenceCurveEvaluator
impl ReferenceCurveEvaluator
Sourcepub const fn new() -> ReferenceCurveEvaluator
pub const fn new() -> ReferenceCurveEvaluator
Evaluator whose reference up is global +Z.
The right default for civil and building work, where z is up by
construction.
Sourcepub fn with_up(up: DVec3) -> Option<ReferenceCurveEvaluator>
pub fn with_up(up: DVec3) -> Option<ReferenceCurveEvaluator>
Evaluator with an explicit reference up direction.
Returns None for a non-finite or zero vector, which cannot
define a roll convention.
Trait Implementations§
Source§impl Backend for ReferenceCurveEvaluator
impl Backend for ReferenceCurveEvaluator
Source§fn descriptor(&self) -> BackendDescriptor
fn descriptor(&self) -> BackendDescriptor
Source§impl Clone for ReferenceCurveEvaluator
impl Clone for ReferenceCurveEvaluator
Source§fn clone(&self) -> ReferenceCurveEvaluator
fn clone(&self) -> ReferenceCurveEvaluator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReferenceCurveEvaluator
Source§impl CurveEvaluator for ReferenceCurveEvaluator
impl CurveEvaluator for ReferenceCurveEvaluator
Source§fn determinism(&self) -> Determinism
fn determinism(&self) -> Determinism
Bitwise: every path is deterministic floating-point arithmetic with no hashing, threading or iteration-order dependence.
Source§fn point_at_on(
&self,
curve: &Curve3,
at: CurveMeasure,
side: SeamSide,
) -> Result<DVec3, GeomError>
fn point_at_on( &self, curve: &Curve3, at: CurveMeasure, side: SeamSide, ) -> Result<DVec3, GeomError>
On a seam (ADR 0082’s rule, both sides), the point
station_section3_on reads there; elsewhere
point_at.
Source§fn tangent_at_on(
&self,
curve: &Curve3,
at: CurveMeasure,
side: SeamSide,
) -> Result<DVec3, GeomError>
fn tangent_at_on( &self, curve: &Curve3, at: CurveMeasure, side: SeamSide, ) -> Result<DVec3, GeomError>
On a seam, the tangent of side’s piece as station_section3_on
reads it; elsewhere tangent_at.
Source§fn frame_at_on(
&self,
curve: &Curve3,
at: CurveMeasure,
side: SeamSide,
) -> Result<Frame3, GeomError>
fn frame_at_on( &self, curve: &Curve3, at: CurveMeasure, side: SeamSide, ) -> Result<Frame3, GeomError>
On a seam, station_section3_on’s frame of side’s piece in this
layout: a banked curve’s rolled section (refused, as by
frame_at, for a reference up other
than +Z), every other curve’s reference-up frame against this
evaluator’s up, which for +Z is the station frame itself.
Elsewhere frame_at.
Source§fn path_distance_convention(&self, path: &CurvePath) -> DistanceConvention
fn path_distance_convention(&self, path: &CurvePath) -> DistanceConvention
The composite’s convention (CompositeBasis::convention), or
DistanceConvention::Unsupported for a path
CompositeBasis::from_path refuses.
Source§fn path_point_at_on(
&self,
path: &CurvePath,
at: CurveMeasure,
side: SeamSide,
) -> Result<DVec3, GeomError>
fn path_point_at_on( &self, path: &CurvePath, at: CurveMeasure, side: SeamSide, ) -> Result<DVec3, GeomError>
The point of CompositeBasis::section_on with side.
Source§fn path_tangent_at_on(
&self,
path: &CurvePath,
at: CurveMeasure,
side: SeamSide,
) -> Result<DVec3, GeomError>
fn path_tangent_at_on( &self, path: &CurvePath, at: CurveMeasure, side: SeamSide, ) -> Result<DVec3, GeomError>
The tangent of CompositeBasis::section_on with side.
Source§fn path_frame_at_on(
&self,
path: &CurvePath,
at: CurveMeasure,
side: SeamSide,
) -> Result<Frame3, GeomError>
fn path_frame_at_on( &self, path: &CurvePath, at: CurveMeasure, side: SeamSide, ) -> Result<Frame3, GeomError>
CompositeBasis::section_on’s frame with side, in this layout:
the station section itself against +Z; against another reference
up, the reference-up frame of the section’s point and tangent,
except on a banked piece, whose cant is measured against +Z and
which is refused, as by frame_at.
Source§fn path_frame_is_exact_at(
&self,
path: &CurvePath,
at: CurveMeasure,
side: SeamSide,
) -> bool
fn path_frame_is_exact_at( &self, path: &CurvePath, at: CurveMeasure, side: SeamSide, ) -> bool
CompositeBasis::frame_is_exact_at for a distance along a path
CompositeBasis::from_path accepts; false otherwise.
Source§fn path_joint_distances(
&self,
path: &CurvePath,
tolerance: f64,
) -> Result<Vec<DistanceInterval>, GeomError>
fn path_joint_distances( &self, path: &CurvePath, tolerance: f64, ) -> Result<Vec<DistanceInterval>, GeomError>
CompositeBasis::joint_intervals of the path (#294): exact
lengths summed as points, numerical ones bounded by chords and
turning or by a certified midpoint rule (crate::station::certify).
Source§fn path_joint_distances_within(
&self,
path: &CurvePath,
around: f64,
window: f64,
tolerance: f64,
) -> Result<Vec<(usize, DistanceInterval)>, GeomError>
fn path_joint_distances_within( &self, path: &CurvePath, around: f64, window: f64, tolerance: f64, ) -> Result<Vec<(usize, DistanceInterval)>, GeomError>
CompositeBasis::joint_intervals_within of the path (#305): the
joints whose certified interval meets the window, each bitwise as
Self::path_joint_distances gives it, certifying only the pieces
before and within the window.
Source§fn distance_convention(&self, curve: &Curve3) -> DistanceConvention
fn distance_convention(&self, curve: &Curve3) -> DistanceConvention
curve. Read moreSource§fn tangent_at(
&self,
curve: &Curve3,
at: CurveMeasure,
) -> Result<DVec3, GeomError>
fn tangent_at( &self, curve: &Curve3, at: CurveMeasure, ) -> Result<DVec3, GeomError>
Source§fn path_point_at(
&self,
path: &CurvePath,
at: CurveMeasure,
) -> Result<DVec3, GeomError>
fn path_point_at( &self, path: &CurvePath, at: CurveMeasure, ) -> Result<DVec3, GeomError>
at along path, reading a joint from its outgoing
piece: path_point_at_on with
SeamSide::Outgoing. Read moreSource§fn path_tangent_at(
&self,
path: &CurvePath,
at: CurveMeasure,
) -> Result<DVec3, GeomError>
fn path_tangent_at( &self, path: &CurvePath, at: CurveMeasure, ) -> Result<DVec3, GeomError>
at along path, reading a joint from its outgoing
piece: path_tangent_at_on with
SeamSide::Outgoing. Read moreSource§fn path_frame_at(
&self,
path: &CurvePath,
at: CurveMeasure,
) -> Result<Frame3, GeomError>
fn path_frame_at( &self, path: &CurvePath, at: CurveMeasure, ) -> Result<Frame3, GeomError>
at along path, reading a joint from its
outgoing piece: path_frame_at_on with
SeamSide::Outgoing. Read moreSource§impl Debug for ReferenceCurveEvaluator
impl Debug for ReferenceCurveEvaluator
Source§impl Default for ReferenceCurveEvaluator
impl Default for ReferenceCurveEvaluator
Source§fn default() -> ReferenceCurveEvaluator
fn default() -> ReferenceCurveEvaluator
Source§impl PartialEq for ReferenceCurveEvaluator
impl PartialEq for ReferenceCurveEvaluator
impl StructuralPartialEq for ReferenceCurveEvaluator
Auto Trait Implementations§
impl Freeze for ReferenceCurveEvaluator
impl RefUnwindSafe for ReferenceCurveEvaluator
impl Send for ReferenceCurveEvaluator
impl Sync for ReferenceCurveEvaluator
impl Unpin for ReferenceCurveEvaluator
impl UnsafeUnpin for ReferenceCurveEvaluator
impl UnwindSafe for ReferenceCurveEvaluator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more