[61] | 1 | /**
|
---|
| 2 | \file
|
---|
| 3 | TerrainContentGenerator.h
|
---|
| 4 | */
|
---|
| 5 | #include "ExampleApplication.h"
|
---|
| 6 |
|
---|
[74] | 7 | /** Class which executes a simple ray query.
|
---|
| 8 | */
|
---|
[61] | 9 | class RayQueryExecutor
|
---|
| 10 | {
|
---|
| 11 | public:
|
---|
[74] | 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 |
|
---|
[61] | 18 | protected:
|
---|
| 19 | RaySceneQuery *mRaySceneQuery;
|
---|
| 20 | };
|
---|
[74] | 21 | /** Class which fills a terrain with content in a random way.
|
---|
| 22 | */
|
---|
[61] | 23 | class TerrainContentGenerator
|
---|
| 24 | {
|
---|
| 25 | public:
|
---|
[75] | 26 | TerrainContentGenerator(SceneManager *sm);
|
---|
| 27 | ~TerrainContentGenerator();
|
---|
[61] | 28 | /** Generates a the scene hierarchy with random values .
|
---|
[74] | 29 | @param number of objects to generate
|
---|
[75] | 30 | @param the name of the mesh to be generated
|
---|
[61] | 31 | */
|
---|
[75] | 32 | void generateScene(int numObjects, const String &meshName);
|
---|
[74] | 33 | /** Generates a new scene object |
---|
[61] | 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 | */ |
---|
[74] | 39 | void generateSceneObject(const Vector3 &translationRatio, const Vector3 &rotationRatio,
|
---|
| 40 | const int idx, const String &entName);
|
---|
[61] | 41 |
|
---|
| 42 | protected:
|
---|
| 43 |
|
---|
| 44 | Real mMinAngle;
|
---|
| 45 | Real mMaxAngle;
|
---|
[74] | 46 | Vector3 mMaxPos;
|
---|
| 47 | Vector3 mMinPos;
|
---|
[61] | 48 |
|
---|
| 49 | RayQueryExecutor *mRayQueryExecutor;
|
---|
| 50 | SceneManager *mSceneMgr;
|
---|
| 51 | int mCount; // The number of objects on the screen
|
---|
| 52 | };
|
---|
| 53 |
|
---|