/****************************************************************************************


	RealVector.h

	Copyright: (c) 2001 Eovia Corp. All rights reserved.

	Author:	Ray Dream (orig. JohnS)
	Date:		3/2/98

	Revision History

	when		who			what & why
	==========	==========	======================================================
	10/21/98	Alec		added Vector4.h to includes - yeuck!
	7/5/98		Alec		removed obsolete vector code
	5/15/98		Alec		merged in VecMath library (replaces several members)
	3/4/98		Greg		Initial conversion (float to real)

*****************************************************************************************/

#ifndef __REALAFFINE3__
#define __REALAFFINE3__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCBasicDefines.h"
#include "Matrix33.h"
#include "Vector3.h"

struct IShTokenStream;

/******************************************************************************\
*                                                                              *
*           RealAffine3                                                        *
*                                                                              *
\******************************************************************************/

class RealAffine3
{
	public:
					RealAffine3		();
		void 		Reset			();
		boolean 	IsIdentity		() const; 

		boolean 	operator==		(const RealAffine3& aff) const; 
		boolean 	operator!=		(const RealAffine3& aff) const; 

		void 		Set				(const TVector3& II, const TVector3& JJ, const TVector3& KK, const TVector3& TT);

		RealAffine3 Inverse			(boolean* success = NULL) const;
		
		void 		ReadAttribute(int32 keyword, IShTokenStream* stream);//NOT implemented
		void 		WriteAttributes(IShTokenStream* stream);//NOT Implemented	

		TMatrix33 	fMat;
		TVector3 	fT;
};

TVector3 	operator* (const RealAffine3& aff, const TVector3& vector);
RealAffine3 operator* (const RealAffine3& aff1, const RealAffine3& aff2);

#endif