Isle
Loading...
Searching...
No Matches
mxquaternion.h
Go to the documentation of this file.
1#ifndef MXQUATERNION_H
2#define MXQUATERNION_H
3
4#include "mxgeometry4d.h"
5
6// SIZE 0x34
7
15public:
17 enum {
18 c_startSet = 0x01,
19 c_endSet = 0x02
20 };
21
25 MxQuaternionTransformer() : m_flags(0) {}
26
33 inline long NormalizeDirection();
34
42 inline void SetStartEnd(Matrix4& p_m1, Matrix4& p_m2);
43
48 inline void SetStart(Matrix4& p_m);
49
54 inline void SetEnd(Matrix4& p_m);
55
60 inline void SetStart(Vector4& p_v);
61
66 inline void SetEnd(Vector4& p_v);
67
75 inline int InterpolateToMatrix(Matrix4& p_matrix, float p_f);
76
83 void GetQuat(Vector4& p_startQuat, Vector4& p_endQuat) const
84 {
85 p_startQuat = m_startQuat;
86 p_endQuat = m_endQuat;
87 }
88
92 undefined4 GetFlags() const { return m_flags; }
93
94private:
104 inline int Interpolate(Vector4& p_v, float p_f);
105
106 Mx4DPointFloat m_startQuat;
107 Mx4DPointFloat m_endQuat;
108 MxU32 m_flags;
109};
110
111#endif // MXQUATERNION_H
4x4 Matrix class with virtual interface for manipulation and transformation.
Definition: matrix.h:24
[AI] 4D point class for floating point values.
Definition: mxgeometry4d.h:18
Quaternion interpolation utility for 4D transformations, supporting quaternion start/end points and s...
Definition: mxquaternion.h:14
void SetEnd(Matrix4 &p_m)
Sets the end quaternion from a matrix.
void SetStart(Matrix4 &p_m)
Sets the start quaternion from a matrix.
MxQuaternionTransformer()
Default constructor; flags zeroed, state unset.
Definition: mxquaternion.h:25
void SetStartEnd(Matrix4 &p_m1, Matrix4 &p_m2)
Sets start and end quaternions by converting two matrices to quaternion form.
undefined4 GetFlags() const
Returns current flag state indicating which ends are set.
Definition: mxquaternion.h:92
int InterpolateToMatrix(Matrix4 &p_matrix, float p_f)
Interpolates between start and end quaternions using spherical interpolation (slerp) and produces a 4...
void GetQuat(Vector4 &p_startQuat, Vector4 &p_endQuat) const
Retrieves the stored start and end quaternions as 4D vectors.
Definition: mxquaternion.h:83
@ c_endSet
End quaternion has been set. [AI].
Definition: mxquaternion.h:19
@ c_startSet
Start quaternion has been set. [AI].
Definition: mxquaternion.h:18
void SetStart(Vector4 &p_v)
Sets the start quaternion from a 4D vector.
long NormalizeDirection()
Ensures shortest path interpolation by potentially flipping the end quaternion's sign.
void SetEnd(Vector4 &p_v)
Sets the end quaternion from a 4D vector.
[AI] A four-dimensional vector, supporting operations relevant for matrix and quaternion math (homoge...
Definition: vector.h:365
unsigned int undefined4
Definition: decomp.h:28
unsigned int MxU32
[AI]
Definition: mxtypes.h:32