comparison pytouhou/utils/matrix.pxd @ 523:6e3b3d5d4691

Make matrix a struct.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 17:53:29 +0100
parents 878273a984c4
children db28538cd399
comparison
equal deleted inserted replaced
522:e8496e5ba056 523:6e3b3d5d4691
1 cdef class Matrix: 1 ctypedef struct Matrix:
2 cdef float data[16] 2 float a, b, c, d
3 float e, f, g, h
4 float i, j, k, l
5 float m, n, o, p
3 6
4 cdef void flip(self) nogil 7 cdef Matrix *new_matrix(Matrix *data) nogil
5 cdef void scale(self, float x, float y, float z) nogil 8 cdef Matrix *new_identity() nogil
6 cdef void scale2d(self, float x, float y) nogil 9
7 cdef void translate(self, float x, float y, float z) nogil 10 cdef void mul(Matrix *mat1, Matrix *mat2) nogil
8 cdef void rotate_x(self, float angle) nogil 11 cdef void flip(Matrix *mat) nogil
9 cdef void rotate_y(self, float angle) nogil 12 cdef void scale(Matrix *mat, float x, float y, float z) nogil
10 cdef void rotate_z(self, float angle) nogil 13 cdef void scale2d(Matrix *mat, float x, float y) nogil
14 cdef void translate(Matrix *mat, float x, float y, float z) nogil
15 cdef void translate2d(Matrix *mat, float x, float y) nogil
16 cdef void rotate_x(Matrix *mat, float angle) nogil
17 cdef void rotate_y(Matrix *mat, float angle) nogil
18 cdef void rotate_z(Matrix *mat, float angle) nogil