1 | #ifndef _TERRAINCONTENTGENERATOR_H__
|
---|
2 | #define _TERRAINCONTENTGENERATOR_H__
|
---|
3 |
|
---|
4 | #include "OgreSceneContentGenerator.h"
|
---|
5 | //#include <Ogre.h>
|
---|
6 |
|
---|
7 | namespace Ogre {
|
---|
8 |
|
---|
9 | /** Class which executes a simple ray query.
|
---|
10 | */
|
---|
11 | class __declspec(dllexport) RayQueryExecutor
|
---|
12 | {
|
---|
13 | public:
|
---|
14 | RayQueryExecutor(SceneManager *sm);
|
---|
15 | ~RayQueryExecutor();
|
---|
16 |
|
---|
17 | bool executeRayQuery(Vector3 *result, const Vector3 &pos, const Vector3 &dir);
|
---|
18 | bool RayQueryExecutor::executeRayQuery( Vector3 *result, const Ray &ray);
|
---|
19 |
|
---|
20 | protected:
|
---|
21 | RaySceneQuery *mRaySceneQuery;
|
---|
22 | };
|
---|
23 |
|
---|
24 | /**
|
---|
25 | Class which randomly fills a terrain with objects.
|
---|
26 | */
|
---|
27 | class __declspec(dllexport) TerrainContentGenerator: public SceneContentGenerator
|
---|
28 | {
|
---|
29 | public:
|
---|
30 | TerrainContentGenerator(SceneManager *sm);
|
---|
31 | ~TerrainContentGenerator();
|
---|
32 |
|
---|
33 | /**
|
---|
34 | Generates objects and places it on the terrain.
|
---|
35 | */
|
---|
36 | SceneNode *GenerateSceneObject(const Vector3 &position,
|
---|
37 | const Vector3 &rotation, const String &objName);
|
---|
38 | /**
|
---|
39 | Generates objects and optionally places it on the terrain.
|
---|
40 | @param clampToTerrain if true, scene object is clamped to the terrain
|
---|
41 | */
|
---|
42 | SceneNode *GenerateSceneObject(const Vector3 &position,
|
---|
43 | const Vector3 &rotation, const String &objName, const bool clampToTerrain);
|
---|
44 |
|
---|
45 | /** offset which is added to objects when put into the terrain */
|
---|
46 | void SetOffset(Real offset);
|
---|
47 |
|
---|
48 | RayQueryExecutor *GetRayQueryExecutor();
|
---|
49 |
|
---|
50 | protected:
|
---|
51 | RayQueryExecutor *mRayQueryExecutor;
|
---|
52 | Real mOffset;
|
---|
53 | };
|
---|
54 |
|
---|
55 | } // namespace Ogre
|
---|
56 | #endif // _TERRAINCONTENTGENERATOR_H |
---|