|
Start with a 10 x 10 element Array call vMap vMap contains either 1s or 0s. A 1 indicates a wall whereas a 0 indicates a floor cell. As the user moves through the grid the Marble_Coord stores the current i and j offsets into the vMap Array. A function call CheckWall looks at the Left, Right, Back, and Forward index values into vMap to see if a wall exists. If a wall exists the marble is not allowed to move. Using user input navigate through the grid. Change the camera height and direction. Notice that the ambient light of the environment is controlled by the glLightModelfv GL_LIGHT_MODEL_Ambient, lmodel_ambient(0) |