Trait radiant_utils::Matrix [−][src]
pub trait Matrix<T> where
T: Copy, { fn set<M>(&mut self, other: M) -> &mut Self
where
[[T; 4]; 4]: From<M>; fn translate<V>(&mut self, translation_vector: V) -> &mut Self
where
V: Vector<T>; fn scale<V>(&mut self, scaling_vector: V) -> &mut Self
where
V: Vector<T>; fn scale_at<P, V>(&mut self, position: P, scaling_vector: V) -> &mut Self
where
P: Vector<T>,
V: Vector<T>; fn rotate(&mut self, radians: T) -> &mut Self; fn rotate_at<P>(&mut self, position: P, radians: T) -> &mut Self
where
P: Vector<T>; fn rotate_axis<V>(&mut self, radians: T, axis: V) -> &mut Self
where
Vec3<T>: From<V>; fn rotate_axis_at<P, V>(
&mut self,
position: P,
radians: T,
axis: V
) -> &mut Self
where
P: Vector<T>,
Vec3<T>: From<V>; fn get_rotation(&self) -> Self; fn get_translation(&self) -> Vec3<T>; fn get_scale(&self) -> Vec3<T>; fn get_euler(&self) -> Vec3<T>; }
Matrix-methods for 4x4 arrays.
Required Methods
ⓘImportant traits for &'a mut R
fn set<M>(&mut self, other: M) -> &mut Self where
[[T; 4]; 4]: From<M>,
[[T; 4]; 4]: From<M>,
Sets the matrix value from another matrix.
ⓘImportant traits for &'a mut R
fn translate<V>(&mut self, translation_vector: V) -> &mut Self where
V: Vector<T>,
V: Vector<T>,
Translate matrix by given vector.
ⓘImportant traits for &'a mut R
fn scale<V>(&mut self, scaling_vector: V) -> &mut Self where
V: Vector<T>,
V: Vector<T>,
Scale matrix by given vector.
ⓘImportant traits for &'a mut R
fn scale_at<P, V>(&mut self, position: P, scaling_vector: V) -> &mut Self where
P: Vector<T>,
V: Vector<T>,
P: Vector<T>,
V: Vector<T>,
Scales at given position.
ⓘImportant traits for &'a mut R
fn rotate(&mut self, radians: T) -> &mut Self
Rotates the origin around z.
ⓘImportant traits for &'a mut R
fn rotate_at<P>(&mut self, position: P, radians: T) -> &mut Self where
P: Vector<T>,
P: Vector<T>,
Rotates around z at given position.
ⓘImportant traits for &'a mut R
fn rotate_axis<V>(&mut self, radians: T, axis: V) -> &mut Self where
Vec3<T>: From<V>,
Vec3<T>: From<V>,
Rotates around axis.
ⓘImportant traits for &'a mut R
fn rotate_axis_at<P, V>(
&mut self,
position: P,
radians: T,
axis: V
) -> &mut Self where
P: Vector<T>,
Vec3<T>: From<V>,
&mut self,
position: P,
radians: T,
axis: V
) -> &mut Self where
P: Vector<T>,
Vec3<T>: From<V>,
Rotates around axis at given position.
fn get_rotation(&self) -> Self
Returns a pure rotation matrix for given matrix
fn get_translation(&self) -> Vec3<T>
Returns the matrix's translation vector.
fn get_scale(&self) -> Vec3<T>
Returns the matrix's scaling vector.
fn get_euler(&self) -> Vec3<T>
Get rotation matrix euler angles.
Implementations on Foreign Types
impl<T> Matrix<T> for [[T; 4]; 4] where
T: Float,
[src]
impl<T> Matrix<T> for [[T; 4]; 4] where
T: Float,
ⓘImportant traits for &'a mut Rfn set<M>(&mut self, other: M) -> &mut Self where
[[T; 4]; 4]: From<M>,
[src]
ⓘImportant traits for &'a mut R
fn set<M>(&mut self, other: M) -> &mut Self where
[[T; 4]; 4]: From<M>,
ⓘImportant traits for &'a mut Rfn translate<V>(&mut self, translation_vector: V) -> &mut Self where
V: Vector<T>,
[src]
ⓘImportant traits for &'a mut R
fn translate<V>(&mut self, translation_vector: V) -> &mut Self where
V: Vector<T>,
ⓘImportant traits for &'a mut Rfn scale<V>(&mut self, scaling_vector: V) -> &mut Self where
V: Vector<T>,
[src]
ⓘImportant traits for &'a mut R
fn scale<V>(&mut self, scaling_vector: V) -> &mut Self where
V: Vector<T>,
ⓘImportant traits for &'a mut Rfn scale_at<P, V>(&mut self, position: P, scaling_vector: V) -> &mut Self where
P: Vector<T>,
V: Vector<T>,
[src]
ⓘImportant traits for &'a mut R
fn scale_at<P, V>(&mut self, position: P, scaling_vector: V) -> &mut Self where
P: Vector<T>,
V: Vector<T>,
ⓘImportant traits for &'a mut Rfn rotate(&mut self, radians: T) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
fn rotate(&mut self, radians: T) -> &mut Self
ⓘImportant traits for &'a mut Rfn rotate_at<P>(&mut self, position: P, radians: T) -> &mut Self where
P: Vector<T>,
[src]
ⓘImportant traits for &'a mut R
fn rotate_at<P>(&mut self, position: P, radians: T) -> &mut Self where
P: Vector<T>,
ⓘImportant traits for &'a mut Rfn rotate_axis<V>(&mut self, radians: T, axis: V) -> &mut Self where
Vec3<T>: From<V>,
[src]
ⓘImportant traits for &'a mut R
fn rotate_axis<V>(&mut self, radians: T, axis: V) -> &mut Self where
Vec3<T>: From<V>,
ⓘImportant traits for &'a mut Rfn rotate_axis_at<P, V>(
&mut self,
position: P,
radians: T,
axis: V
) -> &mut Self where
P: Vector<T>,
Vec3<T>: From<V>,
[src]
ⓘImportant traits for &'a mut R
fn rotate_axis_at<P, V>(
&mut self,
position: P,
radians: T,
axis: V
) -> &mut Self where
P: Vector<T>,
Vec3<T>: From<V>,
fn get_rotation(&self) -> Self
[src]
fn get_rotation(&self) -> Self
fn get_translation(&self) -> Vec3<T>
[src]
fn get_translation(&self) -> Vec3<T>
fn get_scale(&self) -> Vec3<T>
[src]
fn get_scale(&self) -> Vec3<T>
fn get_euler(&self) -> Vec3<T>
[src]
fn get_euler(&self) -> Vec3<T>