/* * GRacer * * Copyright (C) 1999 Takashi Matsuda * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef __GRACER_MATRIX_H__ #define __GRACER_MATRIX_H__ #include "gr_vertex.h" typedef struct GrMatrix { float f[4][4]; } GrMatrix; #ifdef __cplusplus extern "C" { #endif #if 0 } #endif void gr_matrix_mult_vertex (GrMatrix *m, GrVertex *v, GrVertex *dst); void gr_matrix_mult_vertex_without_translate (GrMatrix *m, GrVertex *v, GrVertex *dst); void gr_matrix_copy (GrMatrix *src, GrMatrix *dst); void gr_matrix_mult (GrMatrix *m1, GrMatrix *m2, GrMatrix *dst); void gr_matrix_rotate (GrMatrix *m, GrMatrix *dst, float s, float c, float x, float y, float z); void gr_matrix_rotate_x (GrMatrix *m, GrMatrix *dst, float s, float c); void gr_matrix_rotate_y (GrMatrix *m, GrMatrix *dst, float s, float c); void gr_matrix_rotate_z (GrMatrix *m, GrMatrix *dst, float s, float c); void gr_matrix_translate (GrMatrix *m, GrMatrix *dst, GrVertex *v); void gr_matrix_scale (GrMatrix *m, GrMatrix *dst, GrVertex *v); void gr_matrix_invert (GrMatrix *m, GrMatrix *dst); extern GrMatrix *gr_matrix_identity; #ifdef __cplusplus } #endif #endif /* __GRACER_MATRIX_H__ */