HatchitMath
ht_quaternion.h
1 
26 #pragma once
27 
28 //Pre-Include Defines
29 #define _USE_MATH_DEFINES
30 
31 #include <ht_platform.h>
32 #include <ht_vector3.h>
33 #include <ht_vector4.h>
34 #include <ht_matrix3.h>
35 
36 #include <iostream>
37 #include <cmath>
38 
39 namespace Hatchit
40 {
41  namespace Math
42  {
43  class HT_API Quaternion
44  {
45 
46  public:
47  //Constructors
49  Quaternion();
51  Quaternion(float* m_vector);
52 
53 
60  Quaternion(float w, float x, float y, float z);
71 
72  virtual ~Quaternion();
73 
77  static Quaternion getQuaternionIdentity();
78 
82  Quaternion getInverse();
83 
87  Vector4 getAxisAngle();
88 
92  Matrix4 getRotationMatrix();
93 
94 
99  Quaternion operator* (Quaternion other);
100 
101  public:
102  union
103  {
104  __m128 m_vector;
105  struct
106  {
107  float w, x, y, z;
108  };
109  float data[4];
110  };
111  void normalize();
112  };
113 
118  HT_API std::ostream& operator<< (std::ostream& output, Quaternion& h);
123  HT_API std::istream& operator>> (std::istream& input, Quaternion& h);
124  }
125 }
Hatchit Engine Copyright(c) 2015 Third-Degree.
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_intrin.h:33
Hatchit Engine Copyright(c) 2015 Third-Degree.
Hatchit Engine Copyright(c) 2015 Third-Degree.
Hatchit Engine Copyright(c) 2015 Third-Degree.