160 void operator *=(
const Quaternion& _q ) noexcept;
172 void operator *=(
Real _s ) noexcept;
189 void operator +=(
const Quaternion& _q ) noexcept;
194 void operator -=(
const Quaternion& _q ) noexcept;
200 void normalise() noexcept;
205 Real magnitude()
const noexcept;
220 void operator -() noexcept{m_x=-m_x; m_y=-m_y; m_z=-m_z;}
256 void rotateX(
Real _angle) noexcept;
261 void rotateY(
Real _angle) noexcept;
266 void rotateZ(
Real _angle) noexcept;
272 void fromAxisAngle(
const Vec3 &_axis,
Real _angle) noexcept;
280 void fromEulerAngles(
const Real _x,
const Real _y,
const Real _z) noexcept;
292 void toAxisAngle(
Vec3 &o_axis,
Real &o_angle) noexcept;
297 Mat4 toMat4()
const noexcept;
302 Mat4 toMat4Transpose()
const noexcept;
bool operator==(const ngl::Mat3 &_m1, const ngl::Mat3 &_m2)
simple Vector class for OpenGL graphics, contains overloaded operators for most math functions...
main definition of types and namespace
Real m_s
the quaternion data for the scalar real part
void setVector(const Vec4 &_v) noexcept
mutator for the vector components as an Vec4
void setS(Real &_s) noexcept
mutator for the scalar part
Real getZ() const noexcept
accesor for the z vector components
void setY(Real &_y) noexcept
mutator for the y vector part
Real m_y
the quaternion data for y
simple Vec3 encapsulates a 3 float object like glsl vec3 but not maths use the Vec3 class for maths a...
implementation files for RibExport class
Real m_x
the quaternion data for x
Vec4 getVector() const noexcept
accesor for the vector components as an Vec4
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
void setX(Real &_x) noexcept
mutator for the x vector part
encapsulates a 4d Homogenous Point / Vector object
Quaternion inverse() const noexcept
conjugate negate the vector part can also be done by the -() operator
Real getX() const noexcept
accesor for the x vector components
Quaternion(const Quaternion &_q) noexcept
copy constructor
void setZ(Real &_z) noexcept
mutator for the z vector part
Real getS() const noexcept
accesor for the scalar part
Quaternion operator-() const noexcept
returns the inverse of the quaternion (aka conjugate) the scalar part remains the same and we reverse...
Quaternion(const Real _s=0.0f, const Real _x=0.0f, const Real _y=0.0f, const Real _z=0.0f) noexcept
constructor I use the format used in John Vinces bood where we have a scalar and a vector...
Quaternion conjugate() const noexcept
conjugate negate the vector part can also be done by the -() operator
Real m_z
the quaternion data for z
Vec2 operator*(Real _k, const Vec2 &_v) noexcept
scalar * vector operator
Matrix Class to do simple matrix operations included operator overloaded functions for maths and matr...
Real getY() const noexcept
accesor for the y vector components