blob: f8a2180d9750c2fbe17fa6e2aa8affa0bbcfd398 [file] [log] [blame]
Stefan Kost6eb6d5b2008-10-28 06:50:57 +00001/* 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
Tim-Philipp Müller230cf412012-11-04 00:07:18 +000016 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
Stefan Kost6eb6d5b2008-10-28 06:50:57 +000018 */
Bastien Noceraa7bc7482008-02-23 01:51:37 +000019#ifndef _SURF3D_H
20#define _SURF3D_H
21
22#include "v3d.h"
23#include "goom_graphic.h"
24#include "goom_typedefs.h"
25
26typedef struct {
27 v3d *vertex;
28 v3d *svertex;
29 int nbvertex;
30
31 v3d center;
32} surf3d;
33
34typedef 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 */
47grid3d *grid3d_new (int sizex, int defx, int sizez, int defz, v3d center);
Jan Schmidt4e11c342008-04-22 00:18:52 +000048void grid3d_free (grid3d *g);
Bastien Noceraa7bc7482008-02-23 01:51:37 +000049void grid3d_update (grid3d *s, float angle, float *vals, float dist);
50
51/* low level */
52void surf3d_draw (surf3d *s, int color, int dist, int *buf, int *back, int W,int H);
53void grid3d_draw (PluginInfo *plug, grid3d *g, int color, int colorlow, int dist, Pixel *buf, Pixel *back, int W,int H);
54void surf3d_rotate (surf3d *s, float angle);
55void surf3d_translate (surf3d *s);
56
57#endif