/* [<][>][^][v][top][bottom][index][help] */
1 #ifndef _GLOBALS_HPP_
2 #define _GLOBALS_HPP_
3
4 #include "mesh/CylinderMesh.hpp"
5 #include "mesh/SphereMesh.hpp"
6
7 /* Global variables should be avoided for they increase program’s complexity immensely and because their values can be changed by any function that is called. But it is a necessity in this case.
8 * CylinderGeometry and SphereGeometry implement a caching scheme which is effective iff there is one instance of these objects. Hence they are defined as global variables.
9 * Another approach would be to define these as singleton classes but that is mostly frowned upon and does not provide us any benefit in comparison to declaring global variables.
10 */
11
12 extern CylinderMesh cylinder;
13 extern SphereMesh sphere;
14
15 // light -> setAmbient( osg::);
16 // light -> setDiffuse( osg::);
17 // light -> setSpecular( osg::);
18
19
20
21 #endif /* _GLOBALS_HPP_ */