Public Types |
enum | PrefabType { PT_PLANE
} |
| Prefab shapes available without loading a model. More...
|
Public Methods |
| TerrainSceneManager () |
virtual | ~TerrainSceneManager () |
void | setWorldGeometry (const String &filename) |
| Loads the terrain using parameters int he given config file. More...
|
virtual void | _updateSceneGraph (Camera *cam) |
| Updates all the TerrainRenderables LOD. More...
|
virtual void | _renderVisibleObjects (void) |
| Aligns TerrainRenderable neighbors, and renders them. More...
|
virtual void | _findVisibleObjects (Camera *cam) |
| Just the default. More...
|
float | getHeightAt (float x, float y) |
| Returns the height at the given terrain coordinates. More...
|
bool | intersectSegment (const Vector3 &start, const Vector3 &end, Vector3 *result) |
Vector3 & | getNormalAt (float x, float y) |
| Returns the normal at the given terrain coordinates. More...
|
TerrainRenderable * | getTerrainTile (const Vector3 &pt) |
| Returns the TerrainRenderable that contains the given pt. More...
|
void | init (AxisAlignedBox &box, int d) |
| Initializeds the manager to the given box and depth. More...
|
virtual SceneNode * | createSceneNode (void) |
| Creates a specialized OctreeNode. More...
|
virtual SceneNode * | createSceneNode (const String &name) |
| Creates a specialized OctreeNode. More...
|
virtual Camera * | createCamera (const String &name) |
| Creates a specialized OctreeCamera. More...
|
virtual void | destroySceneNode (const String &name) |
| Deletes a scene node. More...
|
virtual void | _alertVisibleObjects (void) |
| Alerts each unculled object, notifying it that it will be drawn. More...
|
void | walkOctree (OctreeCamera *, RenderQueue *, Octree *, bool foundvisible) |
| Walks through the octree, adding any visible objects to the render queue. More...
|
void | _updateOctreeNode (OctreeNode *) |
| Checks the given OctreeNode, and determines if it needs to be moved to a different octant. More...
|
void | _removeOctreeNode (OctreeNode *) |
| Only removes the node from the octree. More...
|
void | _addOctreeNode (OctreeNode *, Octree *octree, int depth=0) |
| Adds the Octree Node, starting at the given octree, and recursing at max to the specified depth. More...
|
void | findNodesIn (const AxisAlignedBox &box, std::list< SceneNode * > &list, SceneNode *exclude=0) |
| Recurses the octree, adding any nodes intersecting with the box into the given list. More...
|
void | findNodesIn (const Sphere &sphere, std::list< SceneNode * > &list, SceneNode *exclude=0) |
| Recurses the octree, adding any nodes intersecting with the sphere into the given list. More...
|
void | _findNodes (const AxisAlignedBox &box, std::list< SceneNode * > &list, SceneNode *exclude=0, bool full=false, Octree *octant=0) |
| Recurses the octree, adding any nodes intersecting with the box into the given list. More...
|
void | _findNodes (const Sphere &sphere, std::list< SceneNode * > &list, SceneNode *exclude=0, bool full=false, Octree *octant=0) |
| Recurses the octree, adding any nodes intersecting with the sphere into the given list. More...
|
void | setShowBoxes (bool b) |
| Sets the box visibility flag. More...
|
void | setUseCullCamera (bool b) |
| Sets the cull camera flag. More...
|
void | setLooseOctree (bool b) |
void | resize (const AxisAlignedBox &box) |
| Resizes the octree to the given size. More...
|
virtual bool | setOption (const String &, const void *) |
| Sets the given option for the SceneManager. More...
|
virtual bool | getOption (const String &, void *) |
| Gets the given option for the Scene Manager. More...
|
bool | getOptionValues (const String &key, std::list< SDDataChunk > &refValueList) |
| Method for getting all possible values for a specific option. More...
|
bool | getOptionKeys (std::list< String > &refKeys) |
| Method for getting all the implementation-specific options of the scene manager. More...
|
virtual Camera * | getCamera (const String &name) |
| Retrieves a pointer to the named camera. More...
|
virtual void | removeCamera (Camera *cam) |
| Removes a camera from the scene. More...
|
virtual void | removeCamera (const String &name) |
| Removes a camera from the scene. More...
|
virtual void | removeAllCameras (void) |
| Removes (and destroys) all cameras from the scene. More...
|
virtual Light * | createLight (const String &name) |
| Creates a light for use in the scene. More...
|
virtual Light * | getLight (const String &name) |
| Returns a pointer to the named Light which has previously been added to the scene. More...
|
virtual void | removeLight (const String &name) |
| Removes the named light from the scene and destroys it. More...
|
virtual void | removeLight (Light *light) |
| Removes the light from the scene and destroys it based on a pointer. More...
|
virtual void | removeAllLights (void) |
| Removes and destroys all lights in the scene. More...
|
virtual Material * | createMaterial (const String &name) |
| Creates a new (blank) material with the specified name. More...
|
virtual Material * | getDefaultMaterialSettings (void) |
| Returns a pointer to the default Material settings. More...
|
virtual void | addMaterial (const Material &mat) |
| Adds a material created outside the SceneManager to it's internal list. More...
|
virtual Material * | getMaterial (const String &name) |
| Gets a reference to a named Material. More...
|
virtual Material * | getMaterial (int handle) |
| Gets a reference to a material by it's numerical handle. More...
|
virtual SceneNode * | getRootSceneNode (void) const |
| Gets the SceneNode at the root of the scene hierarchy. More...
|
virtual SceneNode * | getSceneNode (const String &name) const |
| Retrieves a named SceneNode from the scene graph. More...
|
virtual Entity * | createEntity (const String &entityName, const String &meshName) |
| Create an Entity (instance of a discrete mesh). More...
|
virtual Entity * | createEntity (const String &entityName, PrefabType ptype) |
| Create an Entity (instance of a discrete mesh) from a range of prefab shapes. More...
|
virtual Entity * | getEntity (const String &name) |
| Retrieves a pointer to the named Entity. More...
|
virtual void | removeEntity (Entity *ent) |
| Removes & destroys an Entity from the SceneManager. More...
|
virtual void | removeEntity (const String &name) |
| Removes & destroys an Entity from the SceneManager by name. More...
|
virtual void | removeAllEntities (void) |
| Removes & destroys all Entities. More...
|
virtual void | clearScene (void) |
| Empties the entire scene, inluding all SceneNodes, Cameras, Entities and Lights etc. More...
|
void | setAmbientLight (ColourValue colour) |
| Sets the ambient light level to be used for the scene. More...
|
ColourValue | getAmbientLight (void) |
| Returns the ambient light level to be used for the scene. More...
|
virtual ViewPoint | getSuggestedViewpoint (bool random=false) |
| Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed. More...
|
virtual bool | hasOption (const String &strKey) |
| Method for verifying wether the scene manager has an implementation-specific option. More...
|
virtual void | _applySceneAnimations (void) |
| Internal method for applying animations to scene nodes. More...
|
virtual void | _renderScene (Camera *camera, Viewport *vp, bool includeOverlays) |
| Prompts the class to send its contents to the renderer. More...
|
virtual void | _queueSkiesForRendering (Camera *cam) |
| Internal method for queueing the sky objects with the params as previously set through setSkyBox, setSkyPlane and setSkyDome. More...
|
virtual void | _renderSubMesh (SubMesh *sm) |
| Internal method for issuing geometry for a mesh to the RenderSystem pipeline. More...
|
virtual void | _updateDynamicLights (void) |
| Sends any updates to the dynamic lights in the world to the renderer. More...
|
virtual void | _setDestinationRenderSystem (RenderSystem *sys) |
| Notifies the scene manager of its destination render system. More...
|
virtual void | setSkyPlane (bool enable, const Plane &plane, const String &materialName, Real scale=1000, Real tiling=10, bool drawFirst=true, Real bow=0) |
| Enables / disables a 'sky plane' i.e. More...
|
virtual void | setSkyBox (bool enable, const String &materialName, Real distance=5000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY) |
| Enables / disables a 'sky box' i.e. More...
|
virtual void | setSkyDome (bool enable, const String &materialName, Real curvature=10, Real tiling=8, Real distance=4000, bool drawFirst=true, const Quaternion &orientation=Quaternion::IDENTITY) |
| Enables / disables a 'sky dome' i.e. More...
|
void | setFog (FogMode mode=FOG_NONE, ColourValue colour=ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0) |
| Sets the fogging mode applied to the scene. More...
|
virtual FogMode | getFogMode (void) const |
| Returns the fog mode for the scene. More...
|
virtual const ColourValue & | getFogColour (void) const |
| Returns the fog colour for the scene. More...
|
virtual Real | getFogStart (void) const |
| Returns the fog start distance for the scene. More...
|
virtual Real | getFogEnd (void) const |
| Returns the fog end distance for the scene. More...
|
virtual Real | getFogDensity (void) const |
| Returns the fog density for the scene. More...
|
virtual void | displaySplashScreen (Viewport *vp, const String &name) |
| Experimental - do not use! More...
|
virtual BillboardSet * | createBillboardSet (const String &name, unsigned int poolSize=20) |
| Creates a new BillboardSet for use with this scene manager. More...
|
virtual BillboardSet * | getBillboardSet (const String &name) |
| Retrieves a pointer to the named BillboardSet. More...
|
virtual void | removeBillboardSet (BillboardSet *set) |
| Removes & destroys an BillboardSet from the SceneManager. More...
|
virtual void | removeBillboardSet (const String &name) |
| Removes & destroys an BillboardSet from the SceneManager by name. More...
|
virtual void | setDisplaySceneNodes (bool display) |
| Tells the SceneManager whether it should render the SceneNodes which make up the scene as well as the objects in the scene. More...
|
virtual Animation * | createAnimation (const String &name, Real length) |
| Creates an animation which can be used to animate scene nodes. More...
|
virtual Animation * | getAnimation (const String &name) const |
| Looks up an Animation object previously created with createAnimation. More...
|
virtual void | destroyAnimation (const String &name) |
| Destroys an Animation. More...
|
virtual void | destroyAllAnimations (void) |
| Removes all animations created using this SceneManager. More...
|
virtual AnimationState * | createAnimationState (const String &animName) |
| Create an AnimationState object for managing application of animations. More...
|
virtual AnimationState * | getAnimationState (const String &animName) |
| Retrieves animation state as previously created using createAnimationState. More...
|
virtual void | destroyAnimationState (const String &name) |
| Destroys an AnimationState. More...
|
virtual void | destroyAllAnimationStates (void) |
| Removes all animation states created using this SceneManager. More...
|
virtual void | manualRender (RenderOperation *rend, Material *mat, Viewport *vp, const Matrix4 &worldMatrix, const Matrix4 &viewMatrix, const Matrix4 &projMatrix) |
| Manual rendering method, for advanced users only. More...
|
virtual Overlay * | createOverlay (const String &name, ushort zorder=100) |
| Creates a new Overlay. More...
|
virtual Overlay * | getOverlay (const String &name) |
| Gets a pointer to the named Overlay, previously created using createOverlay. More...
|
virtual void | destroyOverlay (const String &name) |
| Destroys the named Overlay. More...
|
virtual void | destroyAllOverlays (void) |
| Destroys all the overlays. More...
|
virtual void | addRenderQueueListener (RenderQueueListener *newListener) |
| Registers a new RenderQueueListener which will be notified when render queues are processed. More...
|
virtual void | removeRenderQueueListener (RenderQueueListener *delListener) |
| Removes a listener previously added with addRenderQueueListener. More...
|
void | showBoundingBoxes (bool bShow) |
| Allows all bounding boxes of scene nodes to be displayed. More...
|
bool | getShowBoundingBoxes () |
| Returns if all bounding boxes of scene nodes are to be displayed. More...
|
Static Public Attributes |
int | intersect_call = 0 |
Protected Types |
typedef std::map< std::string,
Camera *, std::less< std::string > > | CameraList |
typedef std::map< std::string,
Light *, std::less< std::string > > | LightList |
typedef std::map< std::string,
Entity *, std::less< std::string > > | EntityList |
typedef std::map< std::string,
BillboardSet *, std::less<
std::string > > | BillboardSetList |
typedef std::map< String,
SceneNode * > | SceneNodeList |
typedef std::map< String,
Animation * > | AnimationList |
| Storage of animations, lookup by name. More...
|
typedef std::vector< RenderQueueListener * > | RenderQueueListenerList |
enum | BoxPlane {
BP_FRONT = 0,
BP_BACK = 1,
BP_LEFT = 2,
BP_RIGHT = 3,
BP_UP = 4,
BP_DOWN = 5
} |
Protected Methods |
bool | _checkSize (int s) |
void | getBoxVerts (AxisAlignedBox &box, Real *r) |
| Inserts the boxes corners into the Real array. More...
|
int | setMaterial (Material *mat, int numLayers) |
| Internal method for setting a material for subsequent rendering. More...
|
Mesh * | createSkyboxPlane (BoxPlane bp, Real distance, const Quaternion &orientation) |
Mesh * | createSkydomePlane (BoxPlane bp, Real curvature, Real tiling, Real distance, const Quaternion &orientation) |
void | useRenderableViewProjMode (Renderable *pRend) |
| Internal method used by _renderVisibleObjects to deal with renderables which override the camera's own view / projection materices. More...
|
bool | fireRenderQueueStarted (RenderQueueGroupID id) |
| Internal method for firing the queue start event, returns true if queue is to be skipped. More...
|
bool | fireRenderQueueEnded (RenderQueueGroupID id) |
| Internal method for firing the queue end event, returns true if queue is to be repeated. More...
|
virtual void | setViewport (Viewport *vp) |
| Internal method for setting the destination viewport for the next render. More...
|
Protected Attributes |
int | mNumTiles |
int | mTileSize |
Vector3 | mTempNormal |
Vector3 | mScale |
Material * | mTerrainMaterial |
SceneNode * | mTerrainRoot |
Terrain2D | mTiles |
Material * | mBlankMaterial |
NodeList | mVisible |
float | mWorldSize |
| the world size. More...
|
Octree * | mOctree |
| The root octree. More...
|
BoxList | mBoxes |
| list of boxes to be rendered. More...
|
RenderOperation | mRenderOp |
| temp render operation. More...
|
int | mNumObjects |
| number of rendered objs. More...
|
int | mMaxDepth |
| max depth for the tree. More...
|
bool | mShowBoxes |
| box visibility flag. More...
|
bool | mCullCamera |
| cull camera flag. More...
|
bool | mLoose |
Real | mCorners [24] |
Matrix4 | mScaleFactor |
RenderQueue | mRenderQueue |
| Queue of objects for rendering. More...
|
ColourValue | mAmbientLight |
| Current ambient light, cached for RenderSystem. More...
|
RenderSystem * | mDestRenderSystem |
| The rendering system to send the scene to. More...
|
CameraList | mCameras |
| Central list of cameras - for easy memory management and lookup. More...
|
LightList | mLights |
| Central list of lights - for easy memory management and lookup. More...
|
EntityList | mEntities |
| Central list of entities - for easy memory management and lookup. More...
|
BillboardSetList | mBillboardSets |
| Central list of billboard sets - for easy memory management and lookup. More...
|
SceneNodeList | mSceneNodes |
| Central list of SceneNodes - for easy memory management. More...
|
Camera * | mCameraInProgress |
| Camera in progress. More...
|
SceneNode * | mSceneRoot |
| Root scene node. More...
|
Entity * | mSkyPlaneEntity |
Entity * | mSkyDomeEntity [5] |
Entity * | mSkyBoxEntity [6] |
SceneNode * | mSkyPlaneNode |
SceneNode * | mSkyDomeNode |
SceneNode * | mSkyBoxNode |
bool | mSkyPlaneEnabled |
bool | mSkyPlaneDrawFirst |
Plane | mSkyPlane |
bool | mSkyBoxEnabled |
bool | mSkyBoxDrawFirst |
Quaternion | mSkyBoxOrientation |
bool | mSkyDomeEnabled |
bool | mSkyDomeDrawFirst |
Quaternion | mSkyDomeOrientation |
FogMode | mFogMode |
ColourValue | mFogColour |
Real | mFogStart |
Real | mFogEnd |
Real | mFogDensity |
bool | mDisplayNodes |
AnimationList | mAnimationsList |
AnimationStateSet | mAnimationStates |
bool | mCamChanged |
| Controller flag for determining if we need to set view/proj matrices. More...
|
RenderQueueListenerList | mRenderQueueListeners |
bool | mShowBoundingBoxes |
| Flag that indicates if all of the scene node's bounding boxes should be shown as a wireframe. More...
|
Static Protected Attributes |
unsigned long | mColors [8] = {white, white, white, white, white, white, white, white } |
unsigned short | mIndexes [24] |
It loads a terrain from a .cfg file that specifices what textures/scale/mipmaps/etc to use.