Trait 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§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§