2015-04-19 20:39:16 +00:00
|
|
|
#ifndef CAXISANGLE_H
|
|
|
|
#define CAXISANGLE_H
|
|
|
|
|
|
|
|
#include "Global.hpp"
|
|
|
|
#include "CVector3f.hpp"
|
2015-10-25 19:31:41 +00:00
|
|
|
#include "CUnitVector.hpp"
|
2015-04-19 20:39:16 +00:00
|
|
|
|
2015-10-08 00:21:38 +00:00
|
|
|
namespace Zeus
|
|
|
|
{
|
2015-10-25 19:31:41 +00:00
|
|
|
struct alignas(16) CAxisAngle : CVector3f
|
2015-04-19 20:39:16 +00:00
|
|
|
{
|
|
|
|
ZE_DECLARE_ALIGNED_ALLOCATOR();
|
|
|
|
|
2015-10-25 19:31:41 +00:00
|
|
|
CAxisAngle() = default;
|
|
|
|
CAxisAngle(const CUnitVector3f& axis, float angle)
|
|
|
|
: CVector3f(axis * angle)
|
2015-04-19 20:39:16 +00:00
|
|
|
{}
|
2015-10-25 19:31:41 +00:00
|
|
|
|
|
|
|
CAxisAngle(const CVector3f& axisAngle)
|
|
|
|
: CVector3f(axisAngle)
|
2015-04-19 20:39:16 +00:00
|
|
|
{}
|
|
|
|
|
2015-10-25 19:31:41 +00:00
|
|
|
float angle() { return magnitude(); }
|
|
|
|
const CVector3f& getVector() { return *this; }
|
2015-04-19 20:39:16 +00:00
|
|
|
};
|
2015-10-08 00:21:38 +00:00
|
|
|
}
|
2015-04-19 20:39:16 +00:00
|
|
|
|
|
|
|
#endif // CAXISANGLE_H
|