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

#pragma once

#include "glmVector3.h"
#include "glmAngle.h"

namespace glm 
{ 
	/**
	* \brief A rotation defined by an axis and an orientation
	* 
	* \ingroup rotations
	* \author Golaem <dev@golaem.com>
	*
	* \param float Manipulated scalar type (\ref Expression, double, float...)
	*/
	class GLM_CORE_API AxisAngle
	{
	public:

		Vector3	_axis;
		Angle	_angle;

		/**
		* \brief Default Constructor.
		* \note by default, the identity rotation is created (along the Z axis, angle=0).
		*/
		AxisAngle();

		/**
		* \brief Constructor from the components of a vector and the value of the angle.
		* \param xValue The x value of the vector.
		* \param yValue The y value of the vector.
		* \param zValue The z value of the vector.
		* \param angleValue The angle value (in radians).
		*/
		AxisAngle(float xValue, float yValue, float zValue, Angle angleValue);

		/**
		* \brief Constructor from a vector and an angle.
		* \param vector The vector.
		* \param angle The angle.
		*/
		AxisAngle(const Vector3 & vector, Angle angle);

		/** 
		* \brief Equality operator 
		*/
		bool operator==(const AxisAngle & axisAngle2);

		/** 
		* \brief Difference operator 
		*/
		bool operator!=(const AxisAngle & axisAngle2);

		/** 
		* \brief Approximate equality operator 
		*/
		static bool approxEqual(const AxisAngle & axisangle1, const AxisAngle & axisangle2, float precision=GLM_NUMERICAL_PRECISION);

		/** 
		* \brief Approximate difference operator 
		*/
		static bool approxDiff(const AxisAngle & axisangle1, const AxisAngle & axisangle2, float precision=GLM_NUMERICAL_PRECISION);
	};
}


