/** \file TerrainContentGenerator.h */ #include "ExampleApplication.h" /** Class which executes a simple ray query. */ class RayQueryExecutor { public: RayQueryExecutor(SceneManager *sm); ~RayQueryExecutor(); bool executeRayQuery(Vector3 *result, const Vector3 &pos, const Vector3 &dir); bool RayQueryExecutor::executeRayQuery( Vector3 *result, const Ray &ray); protected: RaySceneQuery *mRaySceneQuery; }; /** Class which fills a terrain with content in a random way. */ class TerrainContentGenerator { public: TerrainContentGenerator(SceneManager *sm); ~TerrainContentGenerator(); /** Generates a the scene hierarchy with random values . @param number of objects to generate @param the name of the mesh to be generated */ void generateScene(int numObjects, const String &meshName); /** Generates a new scene object @param tranlationRatio ratio between minimal and maximal possible translation @param rotationRatio ratio between minimal and maximal possible rotation @idx the index of the new object @entName the name of the object entity */ void generateSceneObject(const Vector3 &translationRatio, const Vector3 &rotationRatio, const int idx, const String &entName); protected: Real mMinAngle; Real mMaxAngle; Vector3 mMaxPos; Vector3 mMinPos; RayQueryExecutor *mRayQueryExecutor; SceneManager *mSceneMgr; int mCount; // The number of objects on the screen };