#ifndef _TERRAINCONTENTGENERATOR_H__ #define _TERRAINCONTENTGENERATOR_H__ #include "OgreSceneContentGenerator.h" //#include namespace Ogre { /** Class which executes a simple ray query. */ class __declspec(dllexport) 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 randomly fills a terrain with objects. */ class __declspec(dllexport) TerrainContentGenerator: public SceneContentGenerator { public: TerrainContentGenerator(SceneManager *sm); ~TerrainContentGenerator(); /** Generates objects and places it on the terrain. */ SceneNode *GenerateSceneObject(const Vector3 &position, const Vector3 &rotation, const String &objName); /** Generates objects and optionally places it on the terrain. @param clampToTerrain if true, scene object is clamped to the terrain */ SceneNode *GenerateSceneObject(const Vector3 &position, const Vector3 &rotation, const String &objName, const bool clampToTerrain); /** offset which is added to objects when put into the terrain */ void SetOffset(Real offset); RayQueryExecutor *GetRayQueryExecutor(); protected: RayQueryExecutor *mRayQueryExecutor; Real mOffset; }; } // namespace Ogre #endif // _TERRAINCONTENTGENERATOR_H