3 * @author Ashley Tyndall (20915779), Jenna de la Harpe (20367932)
12 // Type definitions for vertex-coordinates, normals, texture-coordinates,
13 // and triangles (via the indices of 3 vertices).
14 typedef GLfloat vertex[3];
15 typedef GLfloat normal[3];
16 typedef GLfloat texCoord[2];
17 typedef GLint vertexIndex;
18 typedef vertexIndex triangle[3];
22 int nVertices; // The number of vertices in the mesh
23 vertex* vertices; // Array with coordinates of vertices
24 normal* normals; // Array with normals of vertices
25 texCoord* texCoords; // Array with texture-coordinates of vertices
26 int nTriangles; // The number of triangles in the mesh
27 triangle* triangles; // Array of trangles via 3 indices into "vertices"
30 // A type for a 2D texture, with height and width in pixels
34 GLubyte *rgbData; // Array of bytes with the colour data for the texture
38 typedef GLfloat vector[3]; // Vector datatype
41 GLfloat parameter; // Transform amount
42 vector* vect; // Transform vector
46 int mesh; // Mesh index number
47 int texture; // Texture index number
48 float x,y,z; // Scene position
49 vector* scale; // Scale vector
50 transform rotation; // Rotation transformation
58 M_ROTATION_TEXTURE_SCALE,
63 M_MATERIAL_AMBIENT_RGB,
64 M_MATERIAL_DIFFUSE_RGB,
65 M_MATERIAL_SPECULAR_RGB,
68 M_MATERIAL_GREEN_ADSS,
73 M_LIGHT_RGBALL_LIGHT_1,
75 M_LIGHT_RGBALL_LIGHT_2
78 // Manipulation states
79 enum manipulateStates {
80 STATE_CAMERA_ROTATE_MOVE,
81 STATE_OBJECT_POSITION_SCALE,
82 STATE_OBJECT_ROTATION_TEXTURE_SCALE