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.
311// 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.
312// NOTE:
313// 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.
610// 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.
611// NOTE:
612// 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.
844// 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.
845// NOTE:
846// 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.
1609// Compute the absolute value of a 4x4 matrix per element
1610//
1611inlineconst Matrix4 absPerElem( const Matrix4 & mat );
1612
1613// Transpose of a 4x4 matrix
1614//
1615inlineconst Matrix4 transpose( const Matrix4 & mat );
1616
1617// Compute the inverse of a 4x4 matrix
1618// NOTE:
1619// Result is unpredictable when the determinant of mat is equal to or near 0.
1620//
1621inlineconst Matrix4 inverse( const Matrix4 & mat );
1622
1623// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix
1624// NOTE:
1625// 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.
1626//
1627inlineconst Matrix4 affineInverse( const Matrix4 & mat );
1628
1629// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix with an orthogonal upper-left 3x3 submatrix
1630// NOTE:
1631// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions.
1632//
1633inlineconst Matrix4 orthoInverse( const Matrix4 & mat );
1634
1635// Determinant of a 4x4 matrix
1636//
1637inlinefloatdeterminant( const Matrix4 & mat );
1638
1639// Conditionally select between two 4x4 matrices
1856// Compute the inverse of a 3x4 transformation matrix, expected to have an orthogonal upper-left 3x3 submatrix
1857// NOTE:
1858// This can be used to achieve better performance than a general inverse when the specified 3x4 transformation matrix meets the given restrictions.