2015-08-25 22:04:15 +00:00
|
|
|
#ifndef CRELANGLE_HPP
|
|
|
|
#define CRELANGLE_HPP
|
|
|
|
|
|
|
|
#include "CVector3f.hpp"
|
|
|
|
#include "Math.hpp"
|
|
|
|
|
2015-10-08 00:21:38 +00:00
|
|
|
namespace Zeus
|
|
|
|
{
|
2015-08-25 22:04:15 +00:00
|
|
|
/**
|
|
|
|
* @brief The CRelAngle class represents relative angles in radians
|
|
|
|
*/
|
2015-10-25 19:31:41 +00:00
|
|
|
class alignas(16) CRelAngle : public CVector3f
|
2015-08-25 22:04:15 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief CRelAngle
|
|
|
|
* @param angles In degrees
|
|
|
|
*/
|
|
|
|
CRelAngle(const CVector3f& angles)
|
|
|
|
{
|
|
|
|
x = Math::degToRad(angles.x);
|
|
|
|
y = Math::degToRad(angles.y);
|
|
|
|
z = Math::degToRad(angles.z);
|
|
|
|
}
|
|
|
|
|
|
|
|
CRelAngle(float x, float y, float z)
|
|
|
|
: CRelAngle(CVector3f{x, y, z})
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
2015-10-08 00:21:38 +00:00
|
|
|
}
|
2015-08-25 22:04:15 +00:00
|
|
|
|
|
|
|
#endif // CRELANGLE_HPP
|