-
Notifications
You must be signed in to change notification settings - Fork 0
/
World.h
39 lines (28 loc) · 1 KB
/
World.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef WORLD_H
#define WORLD_H
//---------- INCLUDES ----------//
#include <Terrain/OgreTerrain.h>
#include <Terrain/OgreTerrainGroup.h>
//---------- DEFINITIONS ----------//
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
class World
{
public:
World (Ogre::SceneManager* sceneManager, Ogre::Light* sun);
virtual ~World (void);
Ogre::Vector3 getTerrainNormal (Ogre::Vector3 worldPosition);
float getTerrainHeight (Ogre::Vector3 worldPosition);
bool terrainRaycast (Ogre::Ray& ray, Ogre::Vector3* resultPosition);
void saveTerrainState (void);
private:
void defineTerrain (long x, long y);
void initBlendMaps (Ogre::Terrain* terrain);
void configureTerrainDefaults (Ogre::SceneManager* sceneManager, Ogre::Light* sun);
void setupWorld (void);
Ogre::TerrainGroup* mTerrainGroup;
Ogre::TerrainGlobalOptions* mTerrainGlobals;
// OgreBites::Label* mInfoLabel;
bool mTerrainsImported;
};
#endif // #ifndef WORLD_H