Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,18 @@ impl<S: BaseFloat> Matrix4<S> {
S::zero(),
S::one())
}

/// Create a matrix which flips the y and z coordnates.
///
/// This is used to transform from a y-up coordinate system to
/// a z-up coordinate systems.
#[inline]
pub fn flip_y_up_to_z_up() -> Matrix4<S> {
Matrix4::new(S::one(), S::zero(), S::zero(), S::zero(),
S::zero(), S::zero(), S::one(), S::zero(),
S::zero(), -S::one(), S::zero(), S::zero(),
S::zero(), S::zero(), S::zero(), S::one())
}
}

impl<S: BaseFloat> Zero for Matrix2<S> {
Expand Down