pub struct ViewFrame {
pub direction: ViewAxis,
pub right: ViewAxis,
pub up: ViewAxis,
}Expand description
How a view looks: direction from the eye into the part, and the
paper’s right and up — right-handed, right x up = -direction.
Fields§
§direction: ViewAxis§right: ViewAxis§up: ViewAxisImplementations§
Source§impl ViewFrame
impl ViewFrame
Sourcepub fn looking(direction: Vector3, up: Vector3) -> GeopResult<Self>
pub fn looking(direction: Vector3, up: Vector3) -> GeopResult<Self>
The frame looking along direction, with right and up on the
paper; direction is normalized, and right and up made
perpendicular to it.
Sourcepub fn project_point(&self, p: &Vector3) -> Vector2
pub fn project_point(&self, p: &Vector3) -> Vector2
Where p lands on the paper.
Sourcepub fn project_curve(&self, curve: &NurbCurve3D) -> GeopResult<NurbCurve2D>
pub fn project_curve(&self, curve: &NurbCurve3D) -> GeopResult<NurbCurve2D>
curve as drawn on the paper: the projection is linear, so it maps
homogeneous control points to homogeneous control points, keeping
the knots and weights — the same parametrization, exactly.
Sourcepub fn toward_eye(&self) -> Vector3
pub fn toward_eye(&self) -> Vector3
The unit vector from the part towards the eye.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewFrame
impl RefUnwindSafe for ViewFrame
impl Send for ViewFrame
impl Sync for ViewFrame
impl Unpin for ViewFrame
impl UnsafeUnpin for ViewFrame
impl UnwindSafe for ViewFrame
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
Mutably borrows from an owned value. Read more