1 /* Goom Project 2 * Copyright (C) <2003> iOS-Software 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 #ifndef _SURF3D_H 20 #define _SURF3D_H 21 22 #include "v3d.h" 23 #include "goom_graphic.h" 24 #include "goom_typedefs.h" 25 26 typedef struct { 27 v3d *vertex; 28 v3d *svertex; 29 int nbvertex; 30 31 v3d center; 32 } surf3d; 33 34 typedef struct { 35 surf3d surf; 36 37 int defx; 38 int sizex; 39 int defz; 40 int sizez; 41 int mode; 42 } grid3d; 43 44 /* hi-level */ 45 46 /* works on grid3d */ 47 grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center); 48 void grid3d_free (grid3d *g); 49 void grid3d_update (grid3d *s, float angle, float *vals, float dist); 50 51 /* low level */ 52 void surf3d_draw (surf3d *s, int color, int dist, int *buf, int *back, int W,int H); 53 void grid3d_draw (PluginInfo *plug, grid3d *g, int color, int colorlow, int dist, Pixel *buf, Pixel *back, int W,int H); 54 void surf3d_rotate (surf3d *s, float angle); 55 void surf3d_translate (surf3d *s); 56 57 #endif 58