Enum nannou::draw::properties::spatial::orientation::Properties
source · pub enum Properties {
Axes(Vec3),
LookAt(Point3),
Quat(Quat),
}
Expand description
Orientation properties for Drawing a Primitive.
Variants§
Axes(Vec3)
The orientation described by an angle along each axis.
LookAt(Point3)
The orientation described by looking at some other point.
Quat(Quat)
Angle described by quarternion.
Implementations§
source§impl Properties
impl Properties
pub fn transform(&self) -> Mat4
sourcepub fn switch_to_axes(&mut self)
pub fn switch_to_axes(&mut self)
If the Properties
was set to the LookAt
variant, this method switches to the Axes
variant.
If the Properties
is already Axes
, nothing changes.
Trait Implementations§
source§impl Clone for Properties
impl Clone for Properties
source§fn clone(&self) -> Properties
fn clone(&self) -> Properties
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Properties
impl Debug for Properties
source§impl Default for Properties
impl Default for Properties
source§impl PartialEq for Properties
impl PartialEq for Properties
source§fn eq(&self, other: &Properties) -> bool
fn eq(&self, other: &Properties) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SetOrientation for Properties
impl SetOrientation for Properties
source§fn properties(&mut self) -> &mut Properties
fn properties(&mut self) -> &mut Properties
Provide a mutable reference to the orientation::Properties for updating.
source§fn look_at(self, target: Point3) -> Self
fn look_at(self, target: Point3) -> Self
Describe orientation via the vector that points to the given target.
source§fn x_radians(self, x: f32) -> Self
fn x_radians(self, x: f32) -> Self
Specify the orientation around the x axis as an absolute value in radians.
source§fn y_radians(self, y: f32) -> Self
fn y_radians(self, y: f32) -> Self
Specify the orientation around the y axis as an absolute value in radians.
source§fn z_radians(self, z: f32) -> Self
fn z_radians(self, z: f32) -> Self
Specify the orientation around the z axis as an absolute value in radians.
source§fn x_degrees(self, x: f32) -> Self
fn x_degrees(self, x: f32) -> Self
Specify the orientation around the x axis as an absolute value in degrees.
source§fn y_degrees(self, y: f32) -> Self
fn y_degrees(self, y: f32) -> Self
Specify the orientation around the y axis as an absolute value in degrees.
source§fn z_degrees(self, z: f32) -> Self
fn z_degrees(self, z: f32) -> Self
Specify the orientation around the z axis as an absolute value in degrees.
source§fn x_turns(self, x: f32) -> Self
fn x_turns(self, x: f32) -> Self
Specify the orientation around the x axis as a number of turns around the axis.
source§fn y_turns(self, y: f32) -> Self
fn y_turns(self, y: f32) -> Self
Specify the orientation around the y axis as a number of turns around the axis.
source§fn z_turns(self, z: f32) -> Self
fn z_turns(self, z: f32) -> Self
Specify the orientation around the z axis as a number of turns around the axis.
source§fn radians(self, v: Vec3) -> Self
fn radians(self, v: Vec3) -> Self
Specify the orientation along each axis with the given Vector of radians. Read more
source§fn degrees(self, v: Vec3) -> Self
fn degrees(self, v: Vec3) -> Self
Specify the orientation along each axis with the given Vector of degrees. Read more
source§fn turns(self, v: Vec3) -> Self
fn turns(self, v: Vec3) -> Self
Specify the orientation along each axis with the given Vector of “turns”. Read more
source§fn euler(self, e: Vec3) -> Self
fn euler(self, e: Vec3) -> Self
Specify the orientation with the given euler orientation in radians.
source§fn quaternion(self, q: Quat) -> Self
fn quaternion(self, q: Quat) -> Self
Specify the orientation with the given Quaternion.
impl Copy for Properties
impl StructuralPartialEq for Properties
Auto Trait Implementations§
impl RefUnwindSafe for Properties
impl Send for Properties
impl Sync for Properties
impl Unpin for Properties
impl UnwindSafe for Properties
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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
source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds
error is returned which contains the unclamped color. Read more