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


		Transform2D.h

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

		Author:	Eric B.
		Date:	12/14/98

		Revision History

		when		who			what & why
		==========	==========	======================================================

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

#ifndef __Transform2D__
#define __Transform2D__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "Matrix22.h"

// TTransform2D - Minimal Representative 2D Transform
class TTransform2D
{
	public:

		void Transform(const TVector2& source, TVector2& dest)
		{
			dest.x = (fRotationAndScale[0][0] * source.x + fRotationAndScale[0][1] * source.y) + fTranslation.x;
			dest.y = (fRotationAndScale[1][0] * source.x + fRotationAndScale[1][1] * source.y) + fTranslation.y;
		}

		TMatrix22		fRotationAndScale;
		TVector2		fTranslation;
};

#endif

