Esempio n. 1
0
float Matrix::Determinant()
{
	return m11 * DeterminantHelper(m22, m23, m24, m32, m33, m34, m42, m43, m44) -
		m12 * DeterminantHelper(m21, m23, m24, m31, m33, m34, m41, m43, m44) +
		m13 * DeterminantHelper(m21, m22, m24, m31, m32, m34, m41, m42, m44) -
		m14 * DeterminantHelper(m21, m22, m23, m31, m32, m33, m41, m42, m43);
}
Esempio n. 2
0
/// Compute the determinant of this matrix.
///
/// @return  Matrix determinant.
float32_t Helium::Simd::Matrix44::GetDeterminant() const
{
    Register determinant, detSubmat33;
    DeterminantHelper( m_matrix, determinant, detSubmat33 );

    return reinterpret_cast< const float32_t* >( &determinant )[ 0 ];
}
Esempio n. 3
0
/// Get the inverse of this matrix.
///
/// @param[out] rMatrix  Matrix inverse.
///
/// @see Invert()
void Helium::Simd::Matrix44::GetInverse( Matrix44& rMatrix ) const
{
    Register invDeterminant, detSubmat33;
    DeterminantHelper( m_matrix, invDeterminant, detSubmat33 );

    invDeterminant = Simd::InverseF32( invDeterminant );

    rMatrix.m_matrix = Simd::MultiplyF32( detSubmat33, invDeterminant );

    rMatrix.Transpose();
}