zeus/include/zeus/CAxisAngle.hpp

17 lines
548 B
C++
Raw Normal View History

2018-10-06 20:39:40 -07:00
#pragma once
2015-04-19 13:39:16 -07:00
#include "zeus/CUnitVector.hpp"
2016-03-04 15:03:26 -08:00
#include "zeus/CVector3f.hpp"
2015-04-19 13:39:16 -07:00
2018-12-07 17:16:50 -08:00
namespace zeus {
struct CAxisAngle : CVector3f {
2019-02-23 23:15:32 -08:00
constexpr CAxisAngle() = default;
constexpr CAxisAngle(float x, float y, float z) : CVector3f(x, y, z) {}
2018-12-07 17:16:50 -08:00
CAxisAngle(const CUnitVector3f& axis, float angle) : CVector3f(angle * axis) {}
2019-02-23 23:15:32 -08:00
constexpr CAxisAngle(const CVector3f& axisAngle) : CVector3f(axisAngle) {}
[[nodiscard]] float angle() const { return magnitude(); }
[[nodiscard]] const CVector3f& getVector() const { return *this; }
2015-04-19 13:39:16 -07:00
};
2018-12-07 21:23:50 -08:00
} // namespace zeus