Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
mat3.h
1 #pragma once
2 
12 #include "core.h"
13 #include "vec3.h"
14 #include <iostream>
15 
16 #ifndef MAT3_H_DEFINED
17 #define MAT3_H_DEFINED
18 
19 namespace rune{
20 
21 class RUNE_ENGINE Mat3
22 {
23 private:
25  double row1[3];
27  double row2[3];
29  double row3[3];
30 
31 public:
33  Mat3();
35  Mat3(double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33);
37  Mat3 operator- (const Mat3& right);
39  Mat3 operator- ();
41  Mat3 operator+ (const Mat3& right);
43  Mat3 operator* (const rune::Mat3& right);
45  Mat3 operator* (double scalar);
47  rune::Vec3 operator*(const rune::Vec3& right);
49  Mat3 operator/ (const Mat3& right);
51  Mat3& operator-=(const Mat3& right);
53  Mat3& operator+=(const Mat3& right);
55  Mat3& operator+=(const double scalar);
57  Mat3& operator*=(const Mat3& right);
59  Mat3& operator*=(const double right);
61  Mat3& operator/=(const Mat3& right);
63  Mat3& operator/=(const double right);
65  bool operator==(const Mat3& right);
67  bool operator!=(const Mat3& right);
69  Mat3 operator/ (double scalar);
71  Mat3 invert();
73  double determinant();
75  double* operator[](int index);
77  friend RUNE_ENGINE std::ostream& operator<<(std::ostream& os, const Mat3& vector);
78 
79 };
80 
82 RUNE_ENGINE rune::Mat3 operator*(double scalar, rune::Mat3& mat);
83 
84 }
85 
86 #endif
rune::Mat3
3 x 3 matrix to be used for math.
Definition: mat3.h:22
rune::Mat3::operator<<
friend RUNE_ENGINE std::ostream & operator<<(std::ostream &os, const Mat3 &vector)
Overload of stream operator for printing.
rune::Vec3
1 x 3 vector to be used for math.
Definition: vec3.h:22
rune::operator/
RUNE_ENGINE Vec2 operator/(double scalar, Vec2 vec)
Overload of / operator for a scalar.
rune
The main namespace to be used for interfacing with the engine.
Definition: animator.h:21
rune::operator*
RUNE_ENGINE rune::Vec2 operator*(rune::Vec2 const &vec, rune::Mat2 &mat)
Overload of multiplication operator for a rune::Mat2.