source: trunk/VUT/Ogre/include/OgreTerrainContentGenerator.h @ 161

Revision 161, 1.6 KB checked in by mattausch, 19 years ago (diff)

added moving robots

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