Trait nannou::draw::properties::spatial::orientation::SetOrientation
source · 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§
sourcefn properties(&mut self) -> &mut Properties
fn properties(&mut self) -> &mut Properties
Provide a mutable reference to the orientation::Properties for updating.
Provided Methods§
sourcefn look_at(self, target: Point3) -> Self
fn look_at(self, target: Point3) -> Self
Describe orientation via the vector that points to the given target.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn radians(self, v: Vec3) -> Self
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)
.
sourcefn degrees(self, v: Vec3) -> Self
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)
.
sourcefn turns(self, v: Vec3) -> Self
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)
.
sourcefn euler(self, e: Vec3) -> Self
fn euler(self, e: Vec3) -> Self
Specify the orientation with the given euler orientation in radians.
sourcefn quaternion(self, q: Quat) -> Self
fn quaternion(self, q: Quat) -> Self
Specify the orientation with the given Quaternion.
sourcefn pitch(self, pitch: f32) -> Self
fn pitch(self, pitch: f32) -> Self
Specify the “pitch” of the orientation in radians.
This has the same effect as calling x_radians
.
sourcefn yaw(self, yaw: f32) -> Self
fn yaw(self, yaw: f32) -> Self
Specify the “yaw” of the orientation in radians.
This has the same effect as calling y_radians
.