2 * Global Variables Header File
3 * @author Ashley Tyndall (20915779), Jenna de la Harpe (20367932)
12 #define NMESH 54 // The number of meshes (in the models-textures dir)
13 #define NTEXTURE 30 // The number of textures (in the models-textures dir)
14 #define MAXOBJECTS 256
16 #define LIGHTS 2 // Number of lights in program
19 #define M_PI 3.14159265358979323846
22 // Meshes and textures arrays
23 extern mesh* meshes[];
24 extern texture* textures[];
27 extern const char *textureMenuEntries[];
28 extern const char *objectMenuEntries[];
30 // Scene object arrays
31 extern SceneObject sceneObjs[];
34 extern int buttonSelected;
35 extern int manipulateState;
37 /* Light object arrays and default values */
38 extern LightObject lightObjs[];
40 extern GLfloat defaultPosition[];
42 extern GLfloat defaultAmbient[];
43 extern GLfloat defaultDiffuse[];
44 extern GLfloat defaultSpecular[];
45 extern GLfloat defaultDirection[];
47 extern GLfloat defaultCutoff;
48 extern GLfloat defaultExponent;
51 extern GLfloat materialAmbient[];
52 extern GLfloat materialDiffuse[];
53 extern GLfloat materialSpecular[];
55 /* Light parameters */
56 extern GLfloat lightShine;
57 extern GLfloat lightGlobalModel[];
58 extern GLfloat lightGlobalEmission[];
59 extern GLfloat lightBallSize;
61 // Directories containing models
62 extern char *dirDefault1;
63 extern char *dirDefault2;
65 // Stores the directory name for the meshes and textures.
66 extern char dataDir[];
68 extern int startx, starty;
70 /* Size of floor, from -n to n */
72 extern float squareSize;
74 /* Current camera position */
75 extern GLfloat camx, camy, camz, keyrot;
76 extern GLfloat factor;
78 /* Length of axis lines */
79 extern GLfloat lineLength;
81 /* Beginning width, height */
82 extern int width, height;
84 /* Zoom and rotate tracking */
85 extern GLfloat zoom, rotate, camAngle;
86 extern GLfloat zoomFactor, camRotateFactor, camAngleFactor;
87 extern GLfloat leftrightFactor, nearfarFactor, bigsmallFactor, updownFactor, rotateFactor, texscaleFactor;
89 /* Texture state tracking */
90 extern int currentGroundTexture, currentMeshTexture;
92 #endif /* GLOBALS_H */