[−][src]Trait nannou::draw::properties::spatial::orientation::SetOrientation
An API for setting the orientation::Properties.
Required methods
fn properties(&mut self) -> &mut Properties<S>
Provide a mutable reference to the orientation::Properties for updating.
Provided methods
fn look_at(self, target: Point3<S>) -> Self
Describe orientation via the vector that points to the given target.
fn x_radians(self, x: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the x axis as an absolute value in radians.
fn y_radians(self, y: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the y axis as an absolute value in radians.
fn z_radians(self, z: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the z axis as an absolute value in radians.
fn x_degrees(self, x: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the x axis as an absolute value in degrees.
fn y_degrees(self, y: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the y axis as an absolute value in degrees.
fn z_degrees(self, z: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the z axis as an absolute value in degrees.
fn x_turns(self, x: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the x axis as a number of turns around the axis.
fn y_turns(self, y: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the y axis as a number of turns around the axis.
fn z_turns(self, z: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation around the z axis as a number of turns around the axis.
fn radians(self, v: Vector3<S>) -> Self where
S: BaseFloat,
S: BaseFloat,
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)
.
fn degrees(self, v: Vector3<S>) -> Self where
S: BaseFloat,
S: BaseFloat,
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)
.
fn turns(self, v: Vector3<S>) -> Self where
S: BaseFloat,
S: BaseFloat,
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)
.
fn euler<A>(self, e: Euler<A>) -> Self where
S: BaseFloat,
A: Angle + Into<Rad<S>>,
S: BaseFloat,
A: Angle + Into<Rad<S>>,
Specify the orientation with the given Euler.
The euler can be specified in either radians (via Rad) or degrees (via Deg).
fn quaternion(self, q: Quaternion<S>) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the orientation with the given Quaternion.
fn pitch(self, pitch: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the "pitch" of the orientation in radians.
This has the same effect as calling x_radians
.
fn yaw(self, yaw: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the "yaw" of the orientation in radians.
This has the same effect as calling y_radians
.
fn roll(self, roll: S) -> Self where
S: BaseFloat,
S: BaseFloat,
Specify the "roll" of the orientation in radians.
This has the same effect as calling z_radians
.
fn rotate(self, radians: S) -> Self where
S: BaseFloat,
S: BaseFloat,
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.