sead
Loading...
Searching...
No Matches
seadQuat.h
Go to the documentation of this file.
1#ifndef SEAD_QUAT_H_
2#define SEAD_QUAT_H_
3
4#include <math/seadVector.h>
5
6namespace sead {
7
8template <typename T>
9class Quat : public Policies<T>::QuatBase
10{
11private:
12 typedef Quat<T> Self;
13 typedef Vector3<T> Vec3;
14
15public:
17 {
18 }
19
20 Quat(T w_, T x_, T y_, T z_);
21
22 void makeUnit();
23 bool makeVectorRotation(const Vec3& from, const Vec3& to);
24 void set(T w_, T x_, T y_, T z_);
25 void setSlerp(const Self& from, const Self& to, f32 t);
26 void slerpTo(const Self& to, f32 t);
27
28 static const Quat unit;
29};
30
31typedef Quat<f32> Quatf;
32
33#ifdef cafe
34static_assert(sizeof(Quatf) == 0x10, "sead::Quat<T> size mismatch");
35#endif // cafe
36
37template <>
38const Quat<f32> Quat<f32>::unit;
39
40} // namespace sead
41
42#ifdef __cplusplus
43
44#include <math/seadQuat.hpp>
45
46#endif // __cplusplus
47
48#endif // #define SEAD_QUAT_H_
Definition seadMathPolicies.h:8
Definition seadQuat.h:10
void makeUnit()
Definition seadQuat.hpp:16
static const Quat unit
Definition seadQuat.h:28
Vector3< T > Vec3
Definition seadQuat.h:13
void slerpTo(const Self &to, f32 t)
Definition seadQuat.hpp:44
Quat(T w_, T x_, T y_, T z_)
Definition seadQuat.hpp:9
void setSlerp(const Self &from, const Self &to, f32 t)
Definition seadQuat.hpp:37
Quat< T > Self
Definition seadQuat.h:12
Quat()
Definition seadQuat.h:16
void set(T w_, T x_, T y_, T z_)
Definition seadQuat.hpp:30
bool makeVectorRotation(const Vec3 &from, const Vec3 &to)
Definition seadQuat.hpp:23
Definition seadVector.h:87
Definition seadAssert.h:44
Quat< f32 > Quatf
Definition seadQuat.h:31