Trait meshx::ops::transform::Rotate

source ·
pub trait Rotate<T: RealField> {
    // Required method
    fn rotate_by_matrix(&mut self, mtx: [[T; 3]; 3]);

    // Provided methods
    fn rotate(&mut self, axis: [T; 3], theta: T) { ... }
    fn rotate_by_vector(&mut self, e: [T; 3])
       where T: Zero { ... }
}
Expand description

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

Required Methods§

source

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

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

Provided Methods§

source

fn rotate(&mut self, axis: [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.

source

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.

Implementors§

source§

impl<T: RealField + Float, M: VertexPositions<Element = [T; 3]>> Rotate<T> for M