taisei/src/matrix.h
Andrei "Akari" Alexeyev 9a7a874783 Use the standard bool type instead of that stupid enum
Also removed all of the annoying trailing tabs/whitespaces
2017-02-11 05:56:47 +02:00

31 lines
No EOL
775 B
C

/*
* This software is licensed under the terms of the MIT-License
* See COPYING for further information.
* ---
* Copyright (C) 2011, Lukas Weber <laochailan@web.de>
*/
#ifndef MATRIX_H
#define MATRIX_H
typedef float Matrix[4][4];
typedef float Vector[3];
extern Matrix _identity;
void matcpy(Matrix dest, Matrix src);
void matmul(Matrix dest, Matrix a, Matrix b);
void matrotate(Matrix md, Matrix ms, float angle, float x, float y, float z);
void matrotatez(Matrix md, Matrix ms, float angle);
void mattranslate(Matrix md, Matrix ms, float x, float y, float z);
void matscale(Matrix md, Matrix ms, float x, float y, float z);
void matvec(Matrix m, Vector v);
void matvecv(Matrix m, Vector *vs, int size);
void normalize(Vector v);
float length(Vector v);
#endif