X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=types.h;h=56cb1fa5da949db9e8dd3098f3954c193b0ab3da;hp=91813eedfc1a061a27607f34a35a2f5d319fc07b;hb=cea3bae600d38602aa6d06fe3d751c8d857e1445;hpb=f1c86cda52b306cdfbe62e1776eb38cff811f47b diff --git a/types.h b/types.h index 91813ee..56cb1fa 100644 --- a/types.h +++ b/types.h @@ -34,22 +34,37 @@ typedef struct { GLubyte *rgbData; // Array of bytes with the colour data for the texture } texture; +// A type for point data +typedef struct { + GLfloat x, y, z; // Amount of rotation on axis +} point; -typedef GLfloat vector[3]; // Vector datatype - +// A type for texture id/scale data typedef struct { - GLfloat parameter; // Transform amount - vector* vect; // Transform vector -} transform; + int id; + GLfloat scale; +} texturedat; +// A type to maintain the state of an object in the scene typedef struct { - int mesh; // Mesh index number - int texture; // Texture index number - float x,y,z; // Scene position - vector* scale; // Scale vector - transform rotation; // Rotation transformation + int mesh; // Mesh index number + texturedat texture; // Texture index number + GLfloat x,y,z; // Scene position + GLfloat scale[3]; // Scale vector + point rotation; // Rotation transformation } SceneObject; +// A type to maintain the state of a light in the scene +typedef struct { + GLfloat position[4]; // Light position + GLfloat ambient[4]; // Ambient parameter + GLfloat diffuse[4]; // Diffuse parameter + GLfloat specular[4]; // Specular parameter + GLfloat direction[3]; // Direction parameter + GLfloat cutoff; // Cutoff of light + char exponent; // Light exponent value, 0 - 128 +} LightObject; + // Menu enum enum menu { // Main menu