Skip to main content

ReferenceCurveEvaluator

Struct ReferenceCurveEvaluator 

Source
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

Source

pub const ID: BackendId

Backend identity.

Source

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.

Source

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.

Source

pub const fn up(&self) -> DVec3

The reference up direction this evaluator builds frames against.

Trait Implementations§

Source§

impl Backend for ReferenceCurveEvaluator

Source§

fn descriptor(&self) -> BackendDescriptor

Runtime descriptor and capability inventory.
Source§

impl Clone for ReferenceCurveEvaluator

Source§

fn clone(&self) -> ReferenceCurveEvaluator

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ReferenceCurveEvaluator

Source§

impl CurveEvaluator for ReferenceCurveEvaluator

Source§

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>

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>

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>

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

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>

The point of CompositeBasis::section_on with side.

Source§

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>

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

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>

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>

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

Which distance this provider measures for curve. Read more
Source§

fn point_at(&self, curve: &Curve3, at: CurveMeasure) -> Result<DVec3, GeomError>

Position at at along curve. Read more
Source§

fn tangent_at( &self, curve: &Curve3, at: CurveMeasure, ) -> Result<DVec3, GeomError>

Unit tangent at at along curve. Read more
Source§

fn frame_at( &self, curve: &Curve3, at: CurveMeasure, ) -> Result<Frame3, GeomError>

Oriented frame at at along curve. Read more
Source§

fn path_point_at( &self, path: &CurvePath, at: CurveMeasure, ) -> Result<DVec3, GeomError>

Position at at along path, reading a joint from its outgoing piece: path_point_at_on with SeamSide::Outgoing. Read more
Source§

fn path_tangent_at( &self, path: &CurvePath, at: CurveMeasure, ) -> Result<DVec3, GeomError>

Unit tangent at at along path, reading a joint from its outgoing piece: path_tangent_at_on with SeamSide::Outgoing. Read more
Source§

fn path_frame_at( &self, path: &CurvePath, at: CurveMeasure, ) -> Result<Frame3, GeomError>

Oriented frame at at along path, reading a joint from its outgoing piece: path_frame_at_on with SeamSide::Outgoing. Read more
Source§

impl Debug for ReferenceCurveEvaluator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for ReferenceCurveEvaluator

Source§

fn default() -> ReferenceCurveEvaluator

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ReferenceCurveEvaluator

Source§

fn eq(&self, other: &ReferenceCurveEvaluator) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ReferenceCurveEvaluator

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.