source: trunk/VUT/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

RevLine 
[107]1#ifndef _TERRAINCONTENTGENERATOR_H__
2#define _TERRAINCONTENTGENERATOR_H__
3
4#include "OgreSceneContentGenerator.h"
5
[161]6#define MAX_HEIGHT 5000 // maximal possible height for object position
7
[107]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:
[183]22       
[107]23        RaySceneQuery *mRaySceneQuery;
24};
25
26/**
[183]27        This class used to fill a terrain with content, e.g.,
28        it randomly fills a terrain with objects of a specific type.
[107]29*/
30class __declspec(dllexport) TerrainContentGenerator: public SceneContentGenerator
31{
32public:
33        TerrainContentGenerator(SceneManager *sm);
34        ~TerrainContentGenerator();
35
[161]36        /** Generates objects and places it on the terrain.
[107]37        */
38        SceneNode *GenerateSceneObject(const Vector3 &position,
[135]39                const Vector3 &rotation, const String &objName);
[161]40        /** Generates objects and optionally places it on the terrain.
[135]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);
[107]45       
[161]46        /** The offset is added to objects when they are put into the terrain.
47        */
[110]48        void SetOffset(Real offset);
[107]49
50protected:
51        RayQueryExecutor *mRayQueryExecutor;
[110]52        Real mOffset;
[107]53};
54
55} // namespace Ogre
56#endif // _TERRAINCONTENTGENERATOR_H
Note: See TracBrowser for help on using the repository browser.