[79] | 1 | #ifndef _SCENECONTENTGENERATOR_H__
|
---|
| 2 | #define _SCENECONTENTGENERATOR_H__
|
---|
| 3 |
|
---|
| 4 | #include <OgrePrerequisites.h>
|
---|
| 5 | #include <OgreMath.h>
|
---|
| 6 | #include <Ogre.h>
|
---|
| 7 |
|
---|
| 8 | namespace Ogre {
|
---|
| 9 |
|
---|
| 10 | /** Class which fills a scene with content in a random fashion.
|
---|
| 11 | */
|
---|
| 12 | class SceneContentGenerator
|
---|
| 13 | {
|
---|
| 14 | public:
|
---|
| 15 | SceneContentGenerator(SceneManager *sm);
|
---|
[82] | 16 | virtual ~SceneContentGenerator() {};
|
---|
[79] | 17 | /** Generates scene object in a random fashion.
|
---|
| 18 | @param number of objects to generate
|
---|
| 19 | @param objName the name of the mesh to be generated
|
---|
| 20 | */
|
---|
| 21 | void GenerateScene(int numObjects, const String &objName);
|
---|
| 22 | /** Generates a new object in the scene using ray scene queries |
---|
[82] | 23 | and inserts it into thr scene hierarchy. |
---|
[79] | 24 | @param position position where the object is created |
---|
| 25 | @param rotation rotation angle applied locally to object |
---|
| 26 | @objName the name of the object entity |
---|
| 27 | @returns scene object if it was successfully created, NULL otherwise |
---|
| 28 | */ |
---|
[82] | 29 | virtual SceneNode *GenerateSceneObject(const Vector3 &position,
|
---|
[79] | 30 | const Vector3 &rotation, const String &objName);
|
---|
| 31 |
|
---|
| 32 | void SetMinAngle(Vector3 minAngle);
|
---|
| 33 | void SetMaxAngle(Vector3 maxAngle);
|
---|
| 34 | void SetMinPos(Vector3 minPos);
|
---|
| 35 | void SetMaxPos(Vector3 maxPos);
|
---|
| 36 |
|
---|
| 37 | protected:
|
---|
| 38 |
|
---|
| 39 | Vector3 mMinAngle;
|
---|
| 40 | Vector3 mMaxAngle;
|
---|
| 41 | Vector3 mMaxPos;
|
---|
| 42 | Vector3 mMinPos;
|
---|
| 43 |
|
---|
| 44 | SceneManager *mSceneMgr;
|
---|
| 45 | int mCount; // The number of objects on the screen
|
---|
| 46 | };
|
---|
| 47 |
|
---|
| 48 | } // namespace Ogre
|
---|
| 49 |
|
---|
| 50 | #endif // SCENECONTENTGENERATOR_H_ |
---|