26 lines
773 B
C++
26 lines
773 B
C++
#pragma once
|
|
|
|
#include <J3ML/LinearAlgebra/Vector3.hpp>
|
|
#include <J3ML/LinearAlgebra/Forward.hpp>
|
|
|
|
namespace J3ML::LinearAlgebra {
|
|
class AxisAngle;
|
|
}
|
|
|
|
/// Transitional datatype, not useful for internal representation of rotation
|
|
/// But has uses for conversion and manipulation.
|
|
class J3ML::LinearAlgebra::AxisAngle {
|
|
public:
|
|
Vector3 axis;
|
|
// Radians.
|
|
float angle;
|
|
public:
|
|
AxisAngle();
|
|
explicit AxisAngle(const Quaternion& q);
|
|
explicit AxisAngle(const EulerAngleXYZ& e);
|
|
/// This constructor derives the Quaternion equivalent of the given matrix, and converts that to AxisAngle representation.
|
|
explicit AxisAngle(const Matrix3x3& m);
|
|
AxisAngle(const Vector3& axis, float angle);
|
|
[[nodiscard]] Quaternion ToQuaternion() const;
|
|
|
|
}; |