/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/include/sgx/core/math/transform3d.hpp

*/

#ifndef SGX_CORE_MATH_TRANSFORM3D_HPP
#define SGX_CORE_MATH_TRANSFORM3D_HPP	1


class sgxTransform3D {
public:
	sgxMatrix43 m;
	tBOOL 		invalid;
	
	SGX_INLINE sgxTransform3D() {
		invalid = TRUE;
	}
	
	SGX_INLINE void inv(sgxMatrix43 &inverse) {
		if (invalid) {
			m_Inverse = m.inverse();
			invalid = FALSE;
		}
		inverse = m_Inverse;	
    }
	
	SGX_INLINE void invalidate() {
		invalid = TRUE;
	}

private:
	sgxMatrix43 m_Inverse;

};

#endif /* SGX_CORE_MATH_TRANSFORM3D_HPP */
