Fixes for datatype size on amd64.
[crack-attack.git] / src / Primitives.h
blob418bc6e21d3e7a63087840ee77ff530b1a4def04
1 /*
2 * Copyright (C) 2006 Bjørn Lindeijer
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 * $Id: Primitives.h,v 1.1 2006/07/19 01:56:21 lorien420 Exp $
21 #ifndef PRIMITIVES_H
22 #define PRIMITIVES_H
24 #include <GL/gl.h>
25 #include <vector>
26 #include <string>
28 enum Direction {
29 None,
30 Left,
31 Right,
32 Up,
33 Down
36 struct Vector
38 Vector();
39 float x, y, z;
42 struct Vertex
44 Vertex();
45 float x, y, z, w;
48 struct VertexTexture
50 VertexTexture();
51 float u, v, w;
54 struct VertexNormal
56 VertexNormal();
57 float i, j, k;
60 struct VertexColor
62 VertexColor();
63 float r, g, b, a;
66 struct FaceVertex
68 FaceVertex();
69 int v, vn, vt, vc;
72 struct Material
74 Material();
75 float ambient[4];
76 float specular[4];
77 float diffuse[4];
78 std::string name;
79 float transparency;
80 int illuminationModel;
81 float shininess;
82 GLuint textureId;
85 struct Face
87 std::vector<FaceVertex> vertices;
88 Material *material;
92 #endif