MATH: Make the Rotation3D/Transform constructors constexpr

This lets us have constexpr structs/classes that contain them
This commit is contained in:
Einar Johan Trøan Sømåen 2023-04-15 09:23:34 +02:00 committed by Eugene Sandulenko
parent c1eedd42c5
commit cfb9c4b251
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ enum EulerOrder {
template<class T>
class Rotation3D : public Transform<T> {
public:
Rotation3D();
constexpr Rotation3D();
/**
* Constructor and assignment from buildFromEuler
@ -101,7 +101,7 @@ public:
};
template<class T>
Rotation3D<T>::Rotation3D() : Transform<T>() {}
constexpr Rotation3D<T>::Rotation3D() : Transform<T>() {}
template<class T>
void Rotation3D<T>::buildFromEuler(const Angle &first, const Angle &second, const Angle &third, EulerOrder order) {

View File

@ -27,7 +27,7 @@ namespace Math {
template<class T>
class Transform {
public:
Transform() {}
constexpr Transform() {}
protected:
inline const T &getMatrix() const { return *static_cast<const T *>(this); }