src/invert.cpp

changeset 33
4c41bfe2ec6e
parent 24
1a0faaaceb84
child 183
97b591813c8b
equal deleted inserted replaced
32:767592024ec5 33:4c41bfe2ec6e
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #include "main.h" 19 #include "main.h"
20 #include "model.h" 20 #include "model.h"
21 #include "matrix.h"
22 #include "gl/common.h" 21 #include "gl/common.h"
23 #include "invert.h" 22 #include "invert.h"
24 23
25 #if 0 24 #if 0
26 /* 25 /*
71 #endif 70 #endif
72 71
73 /* 72 /*
74 * Returns a matrix that causes a flip on the given dimension. 73 * Returns a matrix that causes a flip on the given dimension.
75 */ 74 */
76 Matrix4x4 math::flipmatrix(const Axis dimension) 75 glm::mat4 math::flipmatrix(const Axis dimension)
77 { 76 {
78 Matrix4x4 result = identity4x4; 77 glm::mat4 result = glm::mat4();
79 result(static_cast<int>(dimension), static_cast<int>(dimension)) = -1; 78 const int k = static_cast<int>(dimension);
79 result[k][k] = -1;
80 return result; 80 return result;
81 } 81 }
82 82
83 #if 0 83 #if 0
84 /* 84 /*

mercurial