Skip to main content

Frame

Struct Frame 

Source
pub struct Frame {
    pub origin: Point3,
    pub x: Vec3,
    pub y: Vec3,
}
Expand description

An orthonormal frame at a point on a path.

A sweep needs a full frame, not just a tangent: the profile’s x and y axes have to be carried along the path, and how they are carried is exactly what distinguishes the sweep families from each other.

Fields§

§origin: Point3

Frame origin on the directrix.

§x: Vec3

Image of the profile’s +x.

§y: Vec3

Image of the profile’s +y.

Implementations§

Source§

impl Frame

Source

pub fn from_reference( origin: Point3, tangent: Vec3, reference: Vec3, ) -> GeomResult<Self>

Frame whose z is tangent and whose x is reference made perpendicular to it.

Refuses a reference parallel to the tangent instead of silently picking a fallback axis: the caller supplied a direction that cannot orient the profile, and quietly substituting one rotates the section by an arbitrary angle.

Auto Trait Implementations§

§

impl Freeze for Frame

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnsafeUnpin for Frame

§

impl UnwindSafe for Frame

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
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.