source: trunk/VUT/work/TestCullingTerrain/TerrainContentGenerator.h @ 75

Revision 75, 1.4 KB checked in by mattausch, 19 years ago (diff)
Line 
1/**
2    \file
3        TerrainContentGenerator.h
4*/
5#include "ExampleApplication.h"
6
7/** Class which executes a simple ray query.
8*/
9class RayQueryExecutor
10{
11public:
12        RayQueryExecutor(SceneManager *sm);
13        ~RayQueryExecutor();
14       
15        bool executeRayQuery(Vector3 *result, const Vector3 &pos, const Vector3 &dir);
16        bool RayQueryExecutor::executeRayQuery( Vector3 *result, const Ray &ray);
17
18protected:
19        RaySceneQuery *mRaySceneQuery;
20};
21/** Class which fills a terrain with content in a random way.
22*/
23class TerrainContentGenerator
24{
25public:
26        TerrainContentGenerator(SceneManager *sm);
27        ~TerrainContentGenerator();
28        /** Generates a the scene hierarchy with random values .
29                @param number of objects to generate
30                @param the name of the mesh to be generated
31        */
32        void generateScene(int numObjects, const String &meshName);
33        /** Generates a new scene object
34                @param tranlationRatio ratio between minimal and maximal possible translation
35                @param rotationRatio ratio between minimal and maximal possible rotation
36                @idx the index of the new object
37                @entName the name of the object entity
38        */
39        void generateSceneObject(const Vector3 &translationRatio, const Vector3 &rotationRatio,
40                                                         const int idx, const String &entName);
41
42protected:
43
44        Real mMinAngle;
45        Real mMaxAngle;
46        Vector3 mMaxPos;
47        Vector3 mMinPos;
48
49        RayQueryExecutor *mRayQueryExecutor;
50        SceneManager *mSceneMgr;
51        int mCount;             // The number of objects on the screen
52};
53
Note: See TracBrowser for help on using the repository browser.