[−][src]Trait gut::ops::transform::Rotate
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.
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,
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.