source: branches/VUT/0.3/Ogre/include/OgreTerrainContentGenerator.h @ 183

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

added iv-reader library, testing code, and resources

Line 
1#ifndef _TERRAINCONTENTGENERATOR_H__
2#define _TERRAINCONTENTGENERATOR_H__
3
4#include "OgreSceneContentGenerator.h"
5
6#define MAX_HEIGHT 5000 // maximal possible height for object position
7
8namespace Ogre {
9
10/** Class which executes a simple ray query.
11*/
12class __declspec(dllexport) RayQueryExecutor
13{
14public:
15        RayQueryExecutor(SceneManager *sm);
16        ~RayQueryExecutor();
17       
18        bool executeRayQuery(Vector3 *result, const Vector3 &pos, const Vector3 &dir);
19        bool RayQueryExecutor::executeRayQuery( Vector3 *result, const Ray &ray);
20
21protected:
22       
23        RaySceneQuery *mRaySceneQuery;
24};
25
26/**
27        This class used to fill a terrain with content, e.g.,
28        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.