X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=types.h;h=e18c6f4336cd34de4161c92ab946e0c760816bd0;hp=0d7110ec7993b557ded132674eb64a0b9ebb38b3;hb=e167fee487eef79406a5baa2757a7262811b027b;hpb=295ff719ec8db6df738d0210005a948eb2507c77;ds=sidebyside diff --git a/types.h b/types.h index 0d7110e..e18c6f4 100644 --- a/types.h +++ b/types.h @@ -34,23 +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 -} transform; +} point; +// A type for texture id/scale data typedef struct { int id; GLfloat scale; } texturedat; +// A type to maintain the state of an object in the scene typedef struct { - int mesh; // Mesh index number - texturedat texture; // Texture index number - GLfloat x,y,z; // Scene position - GLfloat scale[3]; // 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 @@ -80,7 +94,9 @@ enum menu { enum manipulateStates { STATE_CAMERA_ROTATE_MOVE, STATE_OBJECT_POSITION_SCALE, - STATE_OBJECT_ROTATION_TEXTURE_SCALE + STATE_OBJECT_ROTATION_TEXTURE_SCALE, + STATE_LIGHT_1_MOVE, + STATE_LIGHT_2_MOVE, }; #endif /* TYPES_H */ \ No newline at end of file