2 Copyright (C) 2009 Sony Computer Entertainment Inc.
3 All rights reserved.
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
309// Store a 3-D vector as half-floats. Memory area of previous 16 bytes and next 32 bytes from <code><i>hfptr</i></code> might be accessed.
310// NOTE:
311// This transformation does not support either denormalized numbers or NaNs. Memory area of previous 16 bytes and next 32 bytes from hfptr might be accessed.
608// Store a 4-D vector as half-floats. Memory area of previous 16 bytes and next 32 bytes from <code><i>hfptr</i></code> might be accessed.
609// NOTE:
610// This transformation does not support either denormalized numbers or NaNs. Memory area of previous 16 bytes and next 32 bytes from hfptr might be accessed.
842// Store a 3-D point as half-floats. Memory area of previous 16 bytes and next 32 bytes from <code><i>hfptr</i></code> might be accessed.
843// NOTE:
844// This transformation does not support either denormalized numbers or NaNs. Memory area of previous 16 bytes and next 32 bytes from hfptr might be accessed.
1592// Compute the absolute value of a 4x4 matrix per element
1593//
1594inlineconst Matrix4 absPerElem( const Matrix4 & mat );
1595
1596// Transpose of a 4x4 matrix
1597//
1598inlineconst Matrix4 transpose( const Matrix4 & mat );
1599
1600// Compute the inverse of a 4x4 matrix
1601// NOTE:
1602// Result is unpredictable when the determinant of mat is equal to or near 0.
1603//
1604inlineconst Matrix4 inverse( const Matrix4 & mat );
1605
1606// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix
1607// NOTE:
1608// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions. The result is unpredictable when the determinant of mat is equal to or near 0.
1609//
1610inlineconst Matrix4 affineInverse( const Matrix4 & mat );
1611
1612// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix with an orthogonal upper-left 3x3 submatrix
1613// NOTE:
1614// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions.
1615//
1616inlineconst Matrix4 orthoInverse( const Matrix4 & mat );
1617
1618// Determinant of a 4x4 matrix
1619//
1620inlinefloatdeterminant( const Matrix4 & mat );
1621
1622// Conditionally select between two 4x4 matrices
1839// Compute the inverse of a 3x4 transformation matrix, expected to have an orthogonal upper-left 3x3 submatrix
1840// NOTE:
1841// This can be used to achieve better performance than a general inverse when the specified 3x4 transformation matrix meets the given restrictions.