Trait nannou::draw::properties::spatial::orientation::SetOrientation

``````pub trait SetOrientation: Sized {
Show 20 methods    // Required method
fn properties(&mut self) -> &mut Properties;

// Provided methods
fn look_at(self, target: Point3) -> Self { ... }
fn x_radians(self, x: f32) -> Self { ... }
fn y_radians(self, y: f32) -> Self { ... }
fn z_radians(self, z: f32) -> Self { ... }
fn x_degrees(self, x: f32) -> Self { ... }
fn y_degrees(self, y: f32) -> Self { ... }
fn z_degrees(self, z: f32) -> Self { ... }
fn x_turns(self, x: f32) -> Self { ... }
fn y_turns(self, y: f32) -> Self { ... }
fn z_turns(self, z: f32) -> Self { ... }
fn radians(self, v: Vec3) -> Self { ... }
fn degrees(self, v: Vec3) -> Self { ... }
fn turns(self, v: Vec3) -> Self { ... }
fn euler(self, e: Vec3) -> Self { ... }
fn quaternion(self, q: Quat) -> Self { ... }
fn pitch(self, pitch: f32) -> Self { ... }
fn yaw(self, yaw: f32) -> Self { ... }
fn roll(self, roll: f32) -> Self { ... }
fn rotate(self, radians: f32) -> Self { ... }
}``````
Expand description

An API for setting the orientation::Properties.

Required Methods§

source

fn properties(&mut self) -> &mut Properties

Provide a mutable reference to the orientation::Properties for updating.

Provided Methods§

source

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

Specify the orientation around the x axis as an absolute value in radians.

source

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

Specify the orientation around the z axis as an absolute value in radians.

source

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

Specify the orientation around the y axis as an absolute value in degrees.

source

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

Specify the orientation around the x axis as a number of turns around the axis.

source

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

Specify the orientation around the z axis as a number of turns around the axis.

source

fn radians(self, v: Vec3) -> Self

Specify the orientation along each axis with the given Vector of radians.

This has the same affect as calling `self.x_radians(v.x).y_radians(v.y).z_radians(v.z)`.

source

fn degrees(self, v: Vec3) -> Self

Specify the orientation along each axis with the given Vector of degrees.

This has the same affect as calling `self.x_degrees(v.x).y_degrees(v.y).z_degrees(v.z)`.

source

fn turns(self, v: Vec3) -> Self

Specify the orientation along each axis with the given Vector of “turns”.

This has the same affect as calling `self.x_turns(v.x).y_turns(v.y).z_turns(v.z)`.

source

fn euler(self, e: Vec3) -> Self

Specify the orientation with the given euler orientation in radians.

source

fn quaternion(self, q: Quat) -> Self

Specify the orientation with the given Quaternion.

source

fn pitch(self, pitch: f32) -> Self

Specify the “pitch” of the orientation in radians.

This has the same effect as calling `x_radians`.

source

fn yaw(self, yaw: f32) -> Self

Specify the “yaw” of the orientation in radians.

This has the same effect as calling `y_radians`.

source

fn roll(self, roll: f32) -> Self

Specify the “roll” of the orientation in radians.

This has the same effect as calling `z_radians`.

source

fn rotate(self, radians: f32) -> Self

Assuming we’re looking at a 2D plane, positive values cause a clockwise rotation where the given value is specified in radians.

This is equivalent to calling the `z_radians` or `roll` methods.

Object Safety§

This trait is not object safe.

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§

source§