[][src]Trait gut::ops::transform::Rotate

pub trait Rotate<T: BaseFloat> {
    fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3]);

    fn rotate(&mut self, [x, y, z]: [T; 3], theta: T) { ... }
fn rotate_by_vector(&mut self, e: [T; 3])
    where
        T: Zero
, { ... } }

Rotate a given object by a certain amount. All functions rotate the object using the right-hand-rule.

Required methods

fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])

Rotate the object using the given column-major rotation matrix.

Loading content...

Provided methods

fn rotate(&mut self, [x, y, z]: [T; 3], theta: T)

Rotate the object around the given unit vector u by the given angle theta (in radians).

Note that it is assumed that u is indeed a unit vector, no further normalization should be performed.

fn rotate_by_vector(&mut self, e: [T; 3]) where
    T: Zero

Rotate the object using the given Euler vector (or rotation vector) e. The direction of e specifies the axis of rotation and its magnitude is the angle in radians.

Loading content...

Implementors

impl<T: BaseFloat, M: VertexPositions<Element = [T; 3]>> Rotate<T> for M[src]

fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3])[src]

Rotate the mesh using the given column-major rotation matrix.

Loading content...