GLubyte *rgbData; // Array of bytes with the colour data for the texture
} texture;
+// A type for point data
typedef struct {
- // You'll need to add scale, rotation, material, mesh number, etc.,
- // to this structure
- float x,y,z;
+ GLfloat x, y, z; // Amount of rotation on axis
+} 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
+ 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
M_LIGHT_RGBALL_LIGHT_2
};
-#endif /* TYPES_H */
+// Manipulation states
+enum manipulateStates {
+ STATE_CAMERA_ROTATE_MOVE,
+ STATE_OBJECT_POSITION_SCALE,
+ STATE_OBJECT_ROTATION_TEXTURE_SCALE
+};
+#endif /* TYPES_H */
\ No newline at end of file