#ifndef INCLUDED_MATH_ROTATION
#define INCLUDED_MATH_ROTATION

#include <LinearMath/btQuaternion.h>

//////////////////////////////////////////////////////////////
namespace Dubious {
namespace Math	{

/// @brief Representation of a Rotation.
///
/// The RotationTemplate is used to represent a rotation.  This is so you can
///	just worry about rotating, and not worry about vectors, quaternions, and 
///	matrices.  It allows you to specify rotations in a number of ways.  It's used
///	in close contact with the CoordinateSpace.  It's a template only so I can 
///	lt the compiler know the difference between a local and global rotation.
template<int T>
class RotationTemplate
{
public:
	/// @brief Constructor.  
	///
	/// Creates a rotation that spacifies no actual rotation.
	///	In other words if you rotate a coordinate space by this, it will
	///	not move at all.
	RotationTemplate()
		: m_Quat( 0, 0, 0, 1 )
	{
	}

	/// @brief Constructor.  
	///
	/// Creates a rotation of Radians about a Vector. 
	///	This system uses a right handed coordinate system (see CoordinateSpace.h).  
	///	Using your right hand as a guide, with your thumb along X, your index finger 
	///	along Y, and your middle finger along Z.  If you rotate 45 degress around 
	///	positive Z you will end up halfway between your thumb and index finger 
	///	(ie. positive rotation is counter clockwise while looking down the negative axis).
	/// @param V - [in] the vector around which you want to rotate
	/// @param Radians - [in] how far you want to rotate (in radians, obviously)
	RotationTemplate( const Vector& V, float Radians )
		: m_Quat( V.Vector(), Radians )
	{
	}

	/// @brief Destructor
	~RotationTemplate()
	{
	}

	/// @brief Accessor 
	///
	/// For use with the bullet phsyics library.  Don't use this unless
	///	you know what's going on.
	const btQuaternion& Quaternion() const { return m_Quat; }

private:
	btQuaternion		m_Quat;
};

typedef RotationTemplate<0> Rotation;
typedef RotationTemplate<1> LocalRotation;

}
}

#endif
