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

Revision 135, 1.5 KB checked in by mattausch, 19 years ago (diff)
Line 
1#ifndef _TERRAINCONTENTGENERATOR_H__
2#define _TERRAINCONTENTGENERATOR_H__
3
4#include "OgreSceneContentGenerator.h"
5//#include <Ogre.h>
6
7namespace Ogre {
8
9/** Class which executes a simple ray query.
10*/
11class __declspec(dllexport) RayQueryExecutor
12{
13public:
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
20protected:
21        RaySceneQuery *mRaySceneQuery;
22};
23
24/**
25        Class which randomly fills a terrain with objects.
26*/
27class __declspec(dllexport) TerrainContentGenerator: public SceneContentGenerator
28{
29public:
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
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.