/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
****************************************************************************/

#pragma once

//math
#include "glmMathBase.h"
#include "glmAngle.h"

namespace glm 
{ 
	/**
	* \brief A rotation defined as the 3 euler angles.
	* 
	* \ingroup rotations
	* \author Golaem <dev@golaem.com>
	*
	* \param heading: angle applied first
	* \param attitude: angle applied second
	* \param bank: angle applied last
	*/
	class GLM_CORE_API EulerAngles
	{
		public:
		/**
		* \brief Data representing the angle 
		*/
		Angle heading;
		Angle attitude;
		Angle bank;

		/**
		* \brief Constructor.
		*/
		EulerAngles()
		 : heading(0.), attitude(0.), bank(0.)
		{}

		/**
		* \brief Constructor.
		*/
		EulerAngles(Angle inHeading, Angle inAttitude, Angle inBank)
		 : heading(inHeading), attitude(inAttitude), bank(inBank)
		{}

		/**
		* \brief Copy constructor.
		*/
		EulerAngles(const EulerAngles& angle)
		{
			heading = angle.heading;
			attitude = angle.attitude;
			bank = angle.bank;
		}

		/** 
		* \brief Approximate equality test between two eulerAngles.
		*
		* \param eulerAngle2 the other eulerAngles.
		* \param precision the equality precision.
		* \return True if the two eulerAngles are approximately equal.
		*/
		bool approxEqual(const EulerAngles& eulerAngle2, float precision = GLM_NUMERICAL_PRECISION) const;
	};
}
