#ifndef _SCENECONTENTGENERATOR_H__ #define _SCENECONTENTGENERATOR_H__ #include #include #include namespace Ogre { /** Class which fills a scene with content in a random fashion. */ class __declspec(dllexport) SceneContentGenerator { public: SceneContentGenerator(SceneManager *sm); virtual ~SceneContentGenerator() {}; /** Generates scene object in a random fashion. @param number of objects to generate @param objName the name of the mesh to be generated */ void GenerateScene(int numObjects, const String &objName); /** Generates a new object in the scene using ray scene queries and inserts it into thr scene hierarchy. @param position position where the object is created @param rotation rotation angle applied locally to object @objName the name of the object entity @returns scene object if it was successfully created, NULL otherwise @remark internally stores pointer to object */ virtual SceneNode *GenerateSceneObject(const Vector3 &position, const Vector3 &rotation, const String &objName); void SetMinAngle(Vector3 minAngle); void SetMaxAngle(Vector3 maxAngle); void SetMinPos(Vector3 minPos); void SetMaxPos(Vector3 maxPos); void SetScale(Vector3 scale); /** the number of created objects */ int GetObjectCount(); /** writes scene nodes to file */ bool WriteObjects(const std::string &filename); /** loads scene nodes from file */ bool LoadObjects(const std::string &filename); SceneNode *GenerateSceneObject(const Vector3 &position, const Quaternion &orientation, const String &objName); protected: Vector3 mMinAngle; Vector3 mMaxAngle; Vector3 mMaxPos; Vector3 mMinPos; Vector3 mScale; SceneManager *mSceneMgr; std::vector mSceneObjects; }; } // namespace Ogre #endif // SCENECONTENTGENERATOR_H_