C# Class Axiom.Core.SceneManager

Manages the organization and rendering of a 'scene' i.e. a collection of objects and potentially world geometry.
This class defines the interface and the basic behaviour of a 'Scene Manager'. A SceneManager organizes the culling and rendering of the scene, in conjunction with the RenderQueue. This class is designed to be extended through subclassing in order to provide more specialized scene organization structures for particular needs. The default SceneManager culls based on a hierarchy of node bounding boxes, other implementations can use an octree (), a BSP tree (), and many other options. New SceneManager implementations can be added at runtime by plugins, see SceneManagerEnumerator for the interfaces for adding new SceneManager types.

There is a distinction between 'objects' (which subclass MovableObject, and are movable, discrete objects in the world), and 'world geometry', which is large, generally static geometry. World geometry tends to influence the SceneManager organizational structure (e.g. lots of indoor static geometry might result in a spatial tree structure) and as such world geometry is generally tied to a given SceneManager implementation, whilst MovableObject instances can be used with any SceneManager. Subclasses are free to define world geometry however they please.

Multiple SceneManager instances can exist at one time, each one with a distinct scene. Which SceneManager is used to render a scene is dependent on the Camera, which will always call back the SceneManager which created it to render the scene.

Inheritance: DisposableObject
Datei anzeigen Open project: mono-soc-2011/axiom Class Usage Examples

Protected Properties

Property Type Description
_activeCompositorChain CompositorChain
_lightsDirtyCounter ulong
ambientColor ColorEx
animationList AnimationCollection
animationStateList AnimationStateSet
autoParamDataSource AutoParamDataSource
autoTrackingSceneNodes SceneNodeCollection
cameraInProgress Camera
cameraList CameraCollection
currentViewport Viewport
defaultRootNode SceneNode
displayNodes bool
findVisibleObjects bool
finiteExtrusionParams GpuProgramParameters
fogColor ColorEx
fogDensity float
fogEnd float
fogMode FogMode
fogStart float
fullScreenQuad Rectangle2D
hasCameraChanged bool
illuminationStage IlluminationRenderStage
infiniteExtrusionParams GpuProgramParameters
isSkyBoxDrawnFirst bool
isSkyBoxEnabled bool
isSkyDomeDrawnFirst bool
isSkyDomeEnabled bool
isSkyPlaneDrawnFirst bool
isSkyPlaneEnabled bool
lastFrameNumber ulong
lastNumTexUnitsUsed int
lastPolyMode PolygonMode
lastProjectionWasIdentity bool
lastUsedFallback bool
lastViewWasIdentity bool
lightsAffectingFrustum LightList
localLightList LightList
movableObjectCollectionMap MovableObjectCollection>.Dictionary
name string
normalizeNormals bool
nullLightList LightList
nullShadowTexture Texture
oldFogColor ColorEx
oldFogDensity float
oldFogEnd float
oldFogMode FogMode
oldFogStart float
op RenderOperation
optionList AxiomCollection
regionList List
renderQueue RenderQueue
renderingMainGroup bool
renderingNoShadowQueue bool
rootSceneNode SceneNode
sceneNodeList SceneNodeCollection
shadowCameraLightMapping Light>.Dictionary
shadowCasterAABBQuery AxisAlignedBoxRegionSceneQuery
shadowCasterList List
shadowCasterPlainBlackPass Pass
shadowCasterQueryListener ShadowCasterSceneQueryListener
shadowCasterSphereQuery SphereRegionSceneQuery
shadowColor ColorEx
shadowDebugPass Pass
shadowDirLightExtrudeDist float
shadowFarDistance float
shadowFarDistanceSquared float
shadowIndexBuffer HardwareIndexBuffer
shadowIndexBufferSize int
shadowMaterialInitDone bool
shadowModulativePass Pass
shadowReceiverPass Pass
shadowStencilPass Pass
shadowTechnique ShadowTechnique
shadowTextureCameras List
shadowTextureCasterMaterial string
shadowTextureConfigDirty bool
shadowTextureConfigList List
shadowTextureCount ushort
shadowTextureCustomCasterFPParams GpuProgramParameters
shadowTextureCustomCasterFragmentProgram string
shadowTextureCustomCasterPass Pass
shadowTextureCustomCasterVPParams GpuProgramParameters
shadowTextureCustomCasterVertexProgram string
shadowTextureCustomReceiverFPParams GpuProgramParameters
shadowTextureCustomReceiverFragmentProgram string
shadowTextureCustomReceiverPass Pass
shadowTextureCustomReceiverVPParams GpuProgramParameters
shadowTextureCustomReceiverVertexProgram string
shadowTextureFadeEnd float
shadowTextureFadeStart float
shadowTextureFormat PixelFormat
shadowTextureOffset float
shadowTextureReceiverMaterial string
shadowTextureSelfShadow bool
shadowTextureSize ushort
shadowTextures List
shadowUseInfiniteFarPlane bool
showBoundingBoxes bool
showDebugShadows bool
skyBoxEntities Entity[]
skyBoxNode SceneNode
skyBoxOrientation Quaternion
skyDomeEntities Entity[]
skyDomeNode SceneNode
skyDomeOrientation Quaternion
skyPlane Plane
skyPlaneEntity Entity
skyPlaneNode SceneNode
specialCaseRenderQueueList SpecialCaseRenderQueue
staticGeometryList StaticGeometry>.Dictionary
suppressRenderStateChanges bool
suppressShadows bool
targetRenderSystem RenderSystem
visibilityMask ulong
worldGeometryRenderQueueId RenderQueueGroupID
xform Matrix4[]

Public Methods

Method Description
ClearScene ( ) : void

Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc. Cameras are not deleted at this stage since they are still referenced by viewports, which are not destroyed during this process.

CreateAABBRegionQuery ( ) : AxisAlignedBoxRegionSceneQuery

Creates a AxisAlignedBoxRegionSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a AxisAlignedBox region.

CreateAABBRegionQuery ( AxisAlignedBox box ) : AxisAlignedBoxRegionSceneQuery

Creates a AxisAlignedBoxRegionSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a AxisAlignedBox region.

CreateAABBRegionQuery ( AxisAlignedBox box, uint mask ) : AxisAlignedBoxRegionSceneQuery

Creates a AxisAlignedBoxRegionSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a AxisAlignedBox region.

CreateAnimation ( string name, float length ) : Animation

Creates an animation which can be used to animate scene nodes.

An animation is a collection of 'tracks' which over time change the position / orientation of Node objects. In this case, the animation will likely have tracks to modify the position / orientation of SceneNode objects, e.g. to make objects move along a path.

You don't need to use an Animation object to move objects around - you can do it yourself using the methods of the Node in your application. However, when you need relatively complex scripted animation, this is the class to use since it will interpolate between keyframes for you and generally make the whole process easier to manage.

A single animation can affect multiple Node objects (each AnimationTrack affects a single Node). In addition, through animation blending a single Node can be affected by multiple animations, although this is more useful when performing skeletal animation (see Skeleton.CreateAnimation).

CreateAnimationState ( string animationName ) : AnimationState

Create an AnimationState object for managing application of animations.

You can create Animation objects for animating SceneNode obejcts using the CreateAnimation method. However, in order to actually apply those animations you have to call methods on Node and Animation in a particular order (namely Node.ResetToInitialState and Animation.Apply). To make this easier and to help track the current time position of animations, the AnimationState object is provided.

So if you don't want to control animation application manually, call this method, update the returned object as you like every frame and let SceneManager apply the animation state for you.

Remember, AnimationState objects are disabled by default at creation time. Turn them on when you want them using their Enabled property.

Note that any SceneNode affected by this automatic animation will have it's state reset to it's initial position before application of the animation. Unless specifically modified using Node.SetInitialState the Node assumes it's initial state is at the origin. If you want the base state of the SceneNode to be elsewhere, make your changes to the node using the standard transform methods, then call SetInitialState to 'bake' this reference position into the node.

CreateBillboardSet ( string name ) : BillboardSet

Overloaded method.

CreateBillboardSet ( string name, int poolSize ) : BillboardSet

Creates a billboard set which can be uses for particles, sprites, etc.

CreateCamera ( string name ) : Camera

Creates a camera to be managed by this scene manager.

This camera can be added to the scene at a later time using the AttachObject method of the SceneNode class.

CreateEntity ( string name, Axiom.Core.Mesh mesh ) : Entity

Create an Entity (instance of a discrete mesh).

CreateEntity ( string name, PrefabEntity prefab ) : Entity

Create an Entity (instance of a discrete mesh).

CreateEntity ( string name, string meshName ) : Entity

Create an Entity (instance of a discrete mesh).

CreateIntersectionQuery ( ) : IntersectionSceneQuery

Creates an IntersectionSceneQuery for this scene manager.

This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.

CreateIntersectionQuery ( uint mask ) : IntersectionSceneQuery

Creates an IntersectionSceneQuery for this scene manager.

This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.

CreateLight ( string name ) : Light

Creates a light that will be managed by this scene manager.

Lights can either be in a fixed position and independent of the scene graph, or they can be attached to SceneNodes so they derive their position from the parent node. Either way, they are created using this method so that the SceneManager manages their existence.

CreateManualObject ( string name ) : ManualObject

Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface.

CreateMovableObject ( string name, string typeName, NamedParameterList para ) : Axiom.Core.MovableObject
CreateMovableText ( string name, string caption, string fontName ) : MovableText

Create MovableText, 3D floating text which can me moved around your scene

CreateOverlay ( string name, int zorder ) : Overlay

Creates a new Overlay.

Overlays can be used to render heads-up-displays (HUDs), menu systems, cockpits and any other 2D or 3D object you need to appear above the rest of the scene. See the Overlay class for more information.

NOTE: after creation, the Overlay is initially hidden. You can create as many overlays as you like ready to be displayed whenever. Just call Overlay.Show to display the overlay.

CreatePlaneBoundedVolumeQuery ( ) : PlaneBoundedVolumeListSceneQuery

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a PlaneBoundedVolumes region.

CreatePlaneBoundedVolumeQuery ( PlaneBoundedVolumeList volumes ) : PlaneBoundedVolumeListSceneQuery

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a PlaneBoundedVolumes region.

CreatePlaneBoundedVolumeQuery ( PlaneBoundedVolumeList volumes, uint mask ) : PlaneBoundedVolumeListSceneQuery

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a PlaneBoundedVolumes region.

CreateRayQuery ( ) : RaySceneQuery

Creates a query to return objects found along the ray.

CreateRayQuery ( Ray ray ) : RaySceneQuery

Creates a query to return objects found along the ray.

CreateRayQuery ( Ray ray, uint mask ) : RaySceneQuery

Creates a query to return objects found along the ray.

CreateRibbonTrail ( string name ) : RibbonTrail
CreateSceneNode ( ) : SceneNode

Creates an instance of a SceneNode.

Note that this does not add the SceneNode to the scene hierarchy. This method is for convenience, since it allows an instance to be created for which the SceneManager is responsible for allocating and releasing memory, which is convenient in complex scenes.

To include the returned SceneNode in the scene, use the AddChild method of the SceneNode which is to be it's parent.

Note that this method takes no parameters, and the node created is unnamed (it is actually given a generated name, which you can retrieve if you want). If you wish to create a node with a specific name, call the alternative method which takes a name parameter.

CreateSceneNode ( string name ) : SceneNode

Creates an instance of a SceneNode with a given name.

Note that this does not add the SceneNode to the scene hierarchy. This method is for convenience, since it allows an instance to be created for which the SceneManager is responsible for allocating and releasing memory, which is convenient in complex scenes.

To include the returned SceneNode in the scene, use the AddChild method of the SceneNode which is to be it's parent.

Note that this method takes a name parameter, which makes the node easier to retrieve directly again later.

CreateSphereRegionQuery ( ) : SphereRegionSceneQuery

Creates a SphereRegionSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a spherical region.

CreateSphereRegionQuery ( Sphere sphere ) : SphereRegionSceneQuery

Creates a SphereRegionSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a spherical region.

CreateSphereRegionQuery ( Sphere sphere, uint mask ) : SphereRegionSceneQuery

Creates a SphereRegionSceneQuery for this scene manager.

This method creates a new instance of a query object for this scene manager, for querying for objects within a spherical region.

CreateStaticGeometry ( string name, int logLevel ) : StaticGeometry

Creates a StaticGeometry instance suitable for use with this SceneManager.

StaticGeometry is a way of batching up geometry into a more efficient form at the expense of being able to move it. Please read the StaticGeometry class documentation for full information.

DestroyAllAnimationStates ( ) : void

Removes all AnimationStates created using this SceneManager.

DestroyAllAnimations ( ) : void

Removes all animations created using this SceneManager.

DestroyAllCameras ( ) : void

Destroy all cameras managed by this SceneManager Method added with MovableObject Factories.

DestroyAllMovableObjects ( ) : void
DestroyAllMovableObjectsByType ( string typeName ) : void
DestroyAllOverlays ( ) : void

Destroys all the overlays.

DestroyAllStaticGeometry ( ) : void

Destroy all StaticGeometry instances.

DestroyAnimation ( string name ) : void

Destroys an Animation.

DestroyAnimationState ( string name ) : void

Destroys an AnimationState.

DestroyCamera ( Camera camera ) : void
DestroyMovableObject ( Axiom.Core.MovableObject m ) : void
DestroyMovableObject ( string name, string typeName ) : void
DestroyOverlay ( string name ) : void

Destroys the named Overlay.

DestroySceneNode ( SceneNode node ) : void

Destroys and removes a node from the scene.

DestroySceneNode ( string name ) : void

Destroys and removes a node from the scene.

DestroyStaticGeometry ( StaticGeometry geom ) : void

Remove & destroy a StaticGeometry instance.

DestroyStaticGeometry ( string name ) : void

Remove & destroy a StaticGeometry instance.

EstimateWorldGeometry ( Stream stream ) : int

Estimate the number of loading stages required to load the named world geometry.

Operates just like the version of this method which takes a filename, but operates on a stream instead. Note that since the stream is updated, you'll need to reset the stream or reopen it when it comes to loading it for real.

EstimateWorldGeometry ( Stream stream, string typeName ) : int

Estimates the world geometry.

Operates just like the version of this method which takes a filename, but operates on a stream instead. Note that since the stream is updated, you'll need to reset the stream or reopen it when it comes to loading it for real.

EstimateWorldGeometry ( string fileName ) : int

Estimate the number of loading stages required to load the named world geometry.

This method should be overridden by SceneManagers that provide custom world geometry that can take some time to load. They should return from this method a count of the number of stages of progress they can report on whilst loading. During real loading (setWorldGeomtry), they should call exactly that number of times when loading the geometry for real.

ExtractAllMovableObjectsByType ( string typeName ) : void
ExtractMovableObject ( Axiom.Core.MovableObject m ) : void
ExtractMovableObject ( string name, string typeName ) : void
FindVisibleObjects ( Camera camera, bool onlyShadowCasters ) : void

Internal method which parses the scene to find visible objects to render.

If you're implementing a custom scene manager, this is the most important method to override since it's here you can apply your custom world partitioning scheme. Once you have added the appropriate objects to the render queue, you can let the default SceneManager objects RenderVisibleObjects handle the actual rendering of the objects you pick.

Any visible objects will be added to a rendering queue, which is indexed by material in order to ensure objects with the same material are rendered together to minimise render state changes.

GetAnimation ( string name ) : Animation

Retreives the animation with the specified name.

GetAnimationState ( string name ) : AnimationState

Retreives the AnimationState with the specified name.

GetBillboardSet ( string name ) : BillboardSet

Retreives the BillboardSet with the specified name.

GetCamera ( string name ) : Camera

Retreives the camera with the specified name.

GetEntity ( string name ) : Entity

Retreives the scene node with the specified name.

GetLight ( string name ) : Light

Retreives the light with the specified name.

GetManualObject ( string name ) : ManualObject

Retrieves the named ManualObject.

GetMaterial ( System.UInt64 handle ) : Material

Returns the material with the specified handle.

GetMaterial ( string name ) : Material

Returns the material with the specified name.

GetMovableObject ( string name, string typeName ) : Axiom.Core.MovableObject
GetMovableObjectCollection ( string typeName ) : Axiom.Collections.MovableObjectCollection
GetMovableText ( string name ) : MovableText

Retrieves the named MovableText.

GetOverlay ( string name ) : Overlay

Gets a the named Overlay, previously created using CreateOverlay.

GetRenderQueue ( ) : RenderQueue

Retrieves the internal render queue.

GetRibbonTrail ( string name ) : RibbonTrail
GetSceneNode ( string name ) : SceneNode

Retreives the scene node with the specified name.

GetStaticGeometry ( string name ) : StaticGeometry

Retrieve a previously created StaticGeometry instance.

GetSuggestedViewpoint ( bool random ) : ViewPoint

Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.

Typically this method returns the origin unless a) world geometry has been loaded using SceneManager.LoadWorldGeometry and b) that world geometry has suggested 'start' points. If there is more than one viewpoint which the scene manager can suggest, it will always suggest the first one unless the random parameter is true.

HasMovableObject ( string name, string typeName ) : bool
HasStaticGeometry ( string name ) : bool

Returns whether a static geometry instance with the given name exists. */

InjectMovableObject ( MovableObject m ) : void
InjectRenderWithPass ( Pass pass, IRenderable rend ) : void
InjectRenderWithPass ( Pass pass, IRenderable rend, bool shadowDerivation ) : void

Render something as if it came from the current queue.

LoadWorldGeometry ( string fileName ) : void

Loads the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc.

Depending on the type of SceneManager (subclasses will be specialized for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".

ManualRender ( RenderOperation op, Pass pass, Viewport vp, Matrix4 worldMatrix, Matrix4 viewMatrix, Matrix4 projMatrix ) : void
ManualRender ( RenderOperation op, Pass pass, Viewport vp, Matrix4 worldMatrix, Matrix4 viewMatrix, Matrix4 projMatrix, bool doBeginEndFrame ) : void

Manual rendering method, for advanced users only.

This method allows you to send rendering commands through the pipeline on demand, bypassing any normal world processing. You should only use this if you really know what you're doing; the engine does lots of things for you that you really should let it do. However, there are times where it may be useful to have this manual interface, for example overlaying something on top of the scene.

Because this is an instant rendering method, timing is important. The best time to call it is from a RenderTarget event handler.

Don't call this method a lot, it's designed for rare (1 or 2 times per frame) use. Calling it regularly per frame will cause frame rate drops!

OverrideRootSceneNode ( SceneNode node ) : void

If set, only the selected node is rendered. To render all nodes, set to null.

PopulateLightList ( Vector3 position, float radius, LightList destList ) : void

Populate a light list with an ordered set of the lights which are closest

Note that since directional lights have no position, they are always considered closer than any point lights and as such will always take precedence.

Subclasses of the default SceneManager may wish to take into account other issues such as possible visibility of the light if that information is included in their data structures. This basic scenemanager simply orders by distance, eliminating those lights which are out of range.

The number of items in the list max exceed the maximum number of lights supported by the renderer, but the extraneous ones will never be used. In fact the limit will be imposed by Pass::getMaxSimultaneousLights.

PrepareWorldGeometry ( Stream stream, string typeName ) : void

Sets the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc. This function can be called before setWorldGeometry in a background thread, do to some slow tasks (e.g. IO) that do not involve the backend render system.

Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a stream to this method and it will attempt to load the world-level geometry for use. If the manager can only handle one input format the typeName parameter is not required. The stream passed will be read (and it's state updated).

PrepareWorldGeometry ( string filename ) : void

Sets the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc. This function can be called before setWorldGeometry in a background thread, do to some slow tasks (e.g. IO) that do not involve the backend render system.

Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".

RekeySceneNode ( string oldName, SceneNode node ) : void
RemoveAllBillboardSets ( ) : void

Removes all billboardsets from the scene.

RemoveAllCameras ( ) : void

Removes all cameras from the scene.

RemoveAllEntities ( ) : void

Removes all entities from the scene.

RemoveAllLights ( ) : void

Removes all lights from the scene.

RemoveAllRibonTrails ( ) : void
RemoveBillboardSet ( BillboardSet billboardSet ) : void

Removes the specified BillboardSet from the scene.

This method removes a previously added BillboardSet from the scene.

RemoveBillboardSet ( string name ) : void

Removes a BillboardSet from the scene with the specified name.

This method removes a previously added BillboardSet from the scene.

RemoveCamera ( Camera camera ) : void

Removes the specified camera from the scene.

This method removes a previously added camera from the scene.

RemoveCamera ( string name ) : void

Removes a camera from the scene with the specified name.

This method removes a previously added camera from the scene.

RemoveEntity ( Entity entity ) : void

Removes the specified entity from the scene.

RemoveEntity ( string name ) : void

Removes the entity with the specified name from the scene.

RemoveLight ( Light light ) : void

Removes the specified light from the scene.

This method removes a previously added light from the scene.

RemoveLight ( string name ) : void

Removes a light from the scene with the specified name.

This method removes a previously added light from the scene.

RemoveRibbonTrail ( RibbonTrail ribbonTrail ) : void
RemoveRibbonTrail ( string name ) : void
ResetViewProjectionMode ( ) : void
RestoreRootSceneNode ( ) : void
SceneManager ( string name ) : System
SetFog ( FogMode mode, ColorEx color, float density ) : void

SetFog ( FogMode mode, ColorEx color, float density, float linearStart, float linearEnd ) : void

Sets the fogging mode applied to the scene.

This method sets up the scene-wide fogging effect. These settings apply to all geometry rendered, UNLESS the material with which it is rendered has it's own fog settings (see Material.SetFog).

SetPass ( Pass pass ) : Pass

If only the first parameter is supplied

SetPass ( Pass pass, bool evenIfSuppressed ) : Pass

If only the first two parameters are supplied

SetPass ( Pass pass, bool evenIfSuppressed, bool shadowDerivation ) : Pass

Internal method for setting up the renderstate for a rendering pass.

SetShadowTextureSettings ( ushort size, ushort count ) : void
SetShadowTextureSettings ( ushort size, ushort count, PixelFormat format ) : void

Sets the size and count of textures used in texture-based shadows.

See ShadowTextureSize and ShadowTextureCount for details, this method just allows you to change both at once, which can save on reallocation if the textures have already been created.

SetSkyBox ( bool enable, string materialName, float distance ) : void

Overloaded method.

SetSkyBox ( bool enable, string materialName, float distance, bool drawFirst, Quaternion orientation, string groupName ) : void

Enables / disables a 'sky box' i.e. a 6-sided box at constant distance from the camera representing the sky.

You could create a sky box yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (you could create this effect by creating a world box which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this skybox applies to any camera using this scene manager).

The material you use for the skybox can either contain layers which are single textures, or they can be cubic textures, i.e. made up of 6 images, one for each plane of the cube. See the TextureLayer class for more information.

SetSkyDome ( bool isEnabled, string materialName, float curvature, float tiling ) : void

SetSkyDome ( bool isEnabled, string materialName, float curvature, float tiling, float distance, bool drawFirst, Quaternion orientation, string groupName ) : void

SetSkyPlane ( bool enable, Plane plane, string materialName ) : void

Overload.

SetSkyPlane ( bool enable, Plane plane, string materialName, float scale, float tiling, bool drawFirst, float bow, string groupName ) : void

Enables / disables a 'sky plane' i.e. a plane at constant distance from the camera representing the sky.

SetWorldGeometry ( Stream stream ) : void
SetWorldGeometry ( Stream stream, string typeName ) : void
SetWorldGeometry ( string filename ) : void

Protected Methods

Method Description
CreateShadowTextures ( ushort size, ushort count, PixelFormat format ) : void

Internal method for creating shadow textures (texture-based shadows).

CreateSkyDomePlane ( BoxPlane plane, float curvature, float tiling, float distance, Quaternion orientation, string groupName ) : Axiom.Core.Mesh

CreateSkyboxPlane ( BoxPlane plane, float distance, Quaternion orientation, string groupName ) : Axiom.Core.Mesh

Utility method for creating the planes of a skybox.

DeriveShadowCasterPass ( Pass pass ) : Pass

Internal method for turning a regular pass into a shadow caster pass.

This is only used for texture shadows, basically we're trying to ensure that objects are rendered solid black. This method will usually return the standard solid black pass for all fixed function passes, but will merge in a vertex program and fudge the AutpoParamDataSource to set black lighting for passes with vertex programs.

DeriveShadowReceiverPass ( Pass pass ) : Pass

Internal method for turning a regular pass into a shadow receiver pass.

This is only used for texture shadows, basically we're trying to ensure that objects are rendered with a projective texture. This method will usually return a standard single-texture pass for all fixed function passes, but will merge in a vertex program for passes with vertex programs.

DestroyShadowTextures ( ) : void
EnsureShadowTexturesCreated ( ) : void
FindLightsAffectingFrustum ( Camera camera ) : void

Internal method for locating a list of lights which could be affecting the frustum.

Custom scene managers are encouraged to override this method to make use of their scene partitioning scheme to more efficiently locate lights, and to eliminate lights which may be occluded by word geometry.

FindShadowCastersForLight ( Light light, Camera camera ) : IList

Internal method for locating a list of shadow casters which could be affecting the frustum for a given light.

Custom scene managers are encouraged to override this method to add optimizations, and to add their own custom shadow casters (perhaps for world geometry)

InitRenderQueue ( ) : void

Internal method for initializing the render queue.

Subclasses can use this to install their own RenderQueue implementation.

InitShadowVolumeMaterials ( ) : void

Internal method for setting up materials for shadows.

NotifyLightsDirty ( ) : void

Advance method to increase the lights dirty counter due lights changed.

Scene manager tracking lights that affecting the frustum, if changes detected (the changes includes light list itself and the light's position and attenuation range), then increase the lights dirty counter. For some reason, you can call this method to force whole scene objects re-populate their light list. But near in mind, call to this method will harm performance, so should avoid if possible.

OnRenderQueueEnded ( RenderQueueGroupID group, string invocation ) : bool

Used to first the QueueEnded event.

OnRenderQueueStarted ( RenderQueueGroupID group, string invocation ) : bool

Used to first the QueueStarted event.

PrepareShadowTextures ( Camera camera, Viewport viewPort ) : void

Internal method for preparing shadow textures ready for use in a regular render

RenderAdditiveStencilShadowedQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group with the added complexity of additive stencil shadows.

RenderBasicQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group in the ordinary way

RenderModulativeStencilShadowedQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group with the added complexity of modulative stencil shadows.

RenderModulativeTextureShadowedQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group with the added complexity of modulative texture shadows.

RenderQueueGroupObjects ( RenderQueueGroup group ) : void

Render the objects in a given queue group.

RenderScene ( Camera camera, Viewport viewport, bool showOverlays ) : void

Prompts the class to send its contents to the renderer.

This method prompts the scene manager to send the contents of the scene it manages to the rendering pipeline, possibly preceded by some sorting, culling or other scene management tasks. Note that this method is not normally called directly by the user application; it is called automatically by the engine's rendering loop.

RenderShadowVolumesToStencil ( Light light, Camera camera ) : void

Internal method for rendering all the objects for a given light into the stencil buffer.

RenderSingleObject ( IRenderable renderable, Pass pass, bool doLightIteration ) : void
RenderSingleObject ( IRenderable renderable, Pass pass, bool doLightIteration, LightList manualLightList ) : void

Internal utility method for rendering a single object.

RenderSingleShadowVolumeToStencil ( ShadowRenderable sr, bool zfail, bool stencil2sided, LightList manualLightList, bool isSecondPass ) : void

Render a single shadow volume to the stencil buffer.

RenderSolidObjects ( System list, bool doLightIteration ) : void
RenderSolidObjects ( System list, bool doLightIteration, LightList manualLightList ) : void

Renders a set of solid objects.

RenderTextureShadowCasterQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group rendering only shadow casters.

RenderTextureShadowReceiverQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group rendering only shadow receivers.

RenderTransparentObjects ( List list, bool doLightIteration ) : void
RenderTransparentObjects ( List list, bool doLightIteration, LightList manualLightList ) : void

Renders a set of transparent objects.

RenderTransparentShadowCasterObjects ( List list, bool doLightIteration, LightList manualLightList ) : void

Render those objects in the transparent pass list which have shadow casting forced on

This function is intended to be used to render the shadows of transparent objects which have transparency_casts_shadows set to 'on' in their material

RenderVisibleObjects ( ) : void

Sends visible objects found in FindVisibleObjects to the rendering engine.

SetShadowVolumeStencilState ( bool secondPass, bool zfail, bool twoSided ) : void

Internal utility method for setting stencil state for rendering shadow volumes.

SetViewport ( Viewport viewport ) : void

Internal method for setting the destination viewport for the next render.

UpdateSceneGraph ( Camera camera ) : void

Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.

This must be done before issuing objects to the rendering pipeline, since derived transformations from parent nodes are not updated until required. This SceneManager is a basic implementation which simply updates all nodes from the root. This ensures the scene is up to date but requires all the nodes to be updated even if they are not visible. Subclasses could trim this such that only potentially visible nodes are updated.

UseRenderableViewProjection ( IRenderable renderable ) : void

Protected method used by RenderVisibleObjects to deal with renderables which override the camera's own view / projection materices.

ValidatePassForRendering ( Pass pass ) : bool

Internal method to validate whether a Pass should be allowed to render.

Called just before a pass is about to be used for rendering a group to allow the SceneManager to omit it if required. A return value of false skips this pass.

ValidateRenderableForRendering ( Pass pass, IRenderable renderable ) : bool

Internal method to validate whether a Renderable should be allowed to render.

Called just before a pass is about to be used for rendering a Renderable to allow the SceneManager to omit it if required. A return value of false skips it.

dispose ( bool disposeManagedResources ) : void

Private Methods

Method Description
ApplySceneAnimations ( ) : void

Internal method for applying animations to scene nodes.

Uses the internally stored AnimationState objects to apply animation to SceneNodes.

CheckShadowCasters ( IList casters, PlaneBoundedVolume nearClipVol, Light light, bool extrudeInSoftware, bool finiteExtrude, bool zfailAlgo, Camera camera, float extrudeDistance, bool stencil2sided, LightList tmpLightList ) : void
DestroySceneNode ( SceneNode node, bool removeFromParent ) : void

Internal method to destroy and remove a node from the scene. Do not remove from parent by option.

EnableHardwareShadowExtrusion ( Light light, bool finiteExtrude ) : void
InitShadowCasterPass ( ) : void
InitShadowDebugPass ( ) : void
InitShadowModulativePass ( ) : void
InitShadowReceiverPass ( ) : void
InitShadowStencilPass ( ) : void
NotifyAutoTrackingSceneNode ( SceneNode node, bool autoTrack ) : void

Internal method for notifying the manager that a SceneNode is autotracking.

PrepareRenderQueue ( ) : void
QueueSkiesForRendering ( Camera camera ) : void

Internal method for queueing the sky objects with the params as previously set through SetSkyBox, SetSkyPlane and SetSkyDome.

RenderAdditiveTextureShadowedQueueGroupObjects ( RenderQueueGroup group ) : void

Render a group with the added complexity of additive texture shadows.

UpdateGpuProgramParameters ( Pass pass ) : void
UpdateRenderQueueGroupSplitOptions ( RenderQueueGroup group, bool suppressShadows, bool suppressRenderState ) : void
UpdateRenderQueueSplitOptions ( ) : void

Method Details

ClearScene() public method

Empties the entire scene, inluding all SceneNodes, Entities, Lights, BillboardSets etc. Cameras are not deleted at this stage since they are still referenced by viewports, which are not destroyed during this process.
public ClearScene ( ) : void
return void

CreateAABBRegionQuery() public method

Creates a AxisAlignedBoxRegionSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a AxisAlignedBox region.
public CreateAABBRegionQuery ( ) : AxisAlignedBoxRegionSceneQuery
return AxisAlignedBoxRegionSceneQuery

CreateAABBRegionQuery() public method

Creates a AxisAlignedBoxRegionSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a AxisAlignedBox region.
public CreateAABBRegionQuery ( AxisAlignedBox box ) : AxisAlignedBoxRegionSceneQuery
box Axiom.Math.AxisAlignedBox AxisAlignedBox to use for the region query.
return AxisAlignedBoxRegionSceneQuery

CreateAABBRegionQuery() public method

Creates a AxisAlignedBoxRegionSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a AxisAlignedBox region.
public CreateAABBRegionQuery ( AxisAlignedBox box, uint mask ) : AxisAlignedBoxRegionSceneQuery
box Axiom.Math.AxisAlignedBox AxisAlignedBox to use for the region query.
mask uint Custom user defined flags to use for the query.
return AxisAlignedBoxRegionSceneQuery

CreateAnimation() public method

Creates an animation which can be used to animate scene nodes.
An animation is a collection of 'tracks' which over time change the position / orientation of Node objects. In this case, the animation will likely have tracks to modify the position / orientation of SceneNode objects, e.g. to make objects move along a path.

You don't need to use an Animation object to move objects around - you can do it yourself using the methods of the Node in your application. However, when you need relatively complex scripted animation, this is the class to use since it will interpolate between keyframes for you and generally make the whole process easier to manage.

A single animation can affect multiple Node objects (each AnimationTrack affects a single Node). In addition, through animation blending a single Node can be affected by multiple animations, although this is more useful when performing skeletal animation (see Skeleton.CreateAnimation).

public CreateAnimation ( string name, float length ) : Animation
name string
length float
return Axiom.Animating.Animation

CreateAnimationState() public method

Create an AnimationState object for managing application of animations.

You can create Animation objects for animating SceneNode obejcts using the CreateAnimation method. However, in order to actually apply those animations you have to call methods on Node and Animation in a particular order (namely Node.ResetToInitialState and Animation.Apply). To make this easier and to help track the current time position of animations, the AnimationState object is provided.

So if you don't want to control animation application manually, call this method, update the returned object as you like every frame and let SceneManager apply the animation state for you.

Remember, AnimationState objects are disabled by default at creation time. Turn them on when you want them using their Enabled property.

Note that any SceneNode affected by this automatic animation will have it's state reset to it's initial position before application of the animation. Unless specifically modified using Node.SetInitialState the Node assumes it's initial state is at the origin. If you want the base state of the SceneNode to be elsewhere, make your changes to the node using the standard transform methods, then call SetInitialState to 'bake' this reference position into the node.

public CreateAnimationState ( string animationName ) : AnimationState
animationName string
return AnimationState

CreateBillboardSet() public method

Overloaded method.
public CreateBillboardSet ( string name ) : BillboardSet
name string
return BillboardSet

CreateBillboardSet() public method

Creates a billboard set which can be uses for particles, sprites, etc.
public CreateBillboardSet ( string name, int poolSize ) : BillboardSet
name string
poolSize int
return BillboardSet

CreateCamera() public method

Creates a camera to be managed by this scene manager.
This camera can be added to the scene at a later time using the AttachObject method of the SceneNode class.
public CreateCamera ( string name ) : Camera
name string
return Camera

CreateEntity() public method

Create an Entity (instance of a discrete mesh).
public CreateEntity ( string name, Axiom.Core.Mesh mesh ) : Entity
name string The name to be given to the entity (must be unique).
mesh Axiom.Core.Mesh The mesh to use.
return Entity

CreateEntity() public method

Create an Entity (instance of a discrete mesh).
public CreateEntity ( string name, PrefabEntity prefab ) : Entity
name string The name to be given to the entity (must be unique).
prefab PrefabEntity The name of the mesh to load. Will be loaded if not already.
return Entity

CreateEntity() public method

Create an Entity (instance of a discrete mesh).
public CreateEntity ( string name, string meshName ) : Entity
name string The name to be given to the entity (must be unique).
meshName string The name of the mesh to load. Will be loaded if not already.
return Entity

CreateIntersectionQuery() public method

Creates an IntersectionSceneQuery for this scene manager.
This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.
public CreateIntersectionQuery ( ) : IntersectionSceneQuery
return IntersectionSceneQuery

CreateIntersectionQuery() public method

Creates an IntersectionSceneQuery for this scene manager.
This method creates a new instance of a query object for locating intersecting objects. See SceneQuery and IntersectionSceneQuery for full details.
public CreateIntersectionQuery ( uint mask ) : IntersectionSceneQuery
mask uint The query mask to apply to this query; can be used to filter out certain objects.
return IntersectionSceneQuery

CreateLight() public method

Creates a light that will be managed by this scene manager.
Lights can either be in a fixed position and independent of the scene graph, or they can be attached to SceneNodes so they derive their position from the parent node. Either way, they are created using this method so that the SceneManager manages their existence.
public CreateLight ( string name ) : Light
name string Name of the light to create.
return Light

CreateManualObject() public method

Create a ManualObject, an object which you populate with geometry manually through a GL immediate-mode style interface.
public CreateManualObject ( string name ) : ManualObject
name string /// The name to be given to the object (must be unique). ///
return ManualObject

CreateMovableObject() public method

public CreateMovableObject ( string name, string typeName, NamedParameterList para ) : Axiom.Core.MovableObject
name string
typeName string
para NamedParameterList
return Axiom.Core.MovableObject

CreateMovableText() public method

Create MovableText, 3D floating text which can me moved around your scene
public CreateMovableText ( string name, string caption, string fontName ) : MovableText
name string /// The name to be given to the object (must be unique). ///
caption string /// The text tyo display ///
fontName string /// The font to use for the text, must be already loaded as a resource. ///
return MovableText

CreateOverlay() public method

Creates a new Overlay.

Overlays can be used to render heads-up-displays (HUDs), menu systems, cockpits and any other 2D or 3D object you need to appear above the rest of the scene. See the Overlay class for more information.

NOTE: after creation, the Overlay is initially hidden. You can create as many overlays as you like ready to be displayed whenever. Just call Overlay.Show to display the overlay.

public CreateOverlay ( string name, int zorder ) : Overlay
name string The name to give the overlay, must be unique.
zorder int The zorder of the overlay relative to it's peers, higher zorders appear on top of lower ones.
return Axiom.Overlays.Overlay

CreatePlaneBoundedVolumeQuery() public method

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a PlaneBoundedVolumes region.
public CreatePlaneBoundedVolumeQuery ( ) : PlaneBoundedVolumeListSceneQuery
return PlaneBoundedVolumeListSceneQuery

CreatePlaneBoundedVolumeQuery() public method

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a PlaneBoundedVolumes region.
public CreatePlaneBoundedVolumeQuery ( PlaneBoundedVolumeList volumes ) : PlaneBoundedVolumeListSceneQuery
volumes PlaneBoundedVolumeList PlaneBoundedVolumeList to use for the region query.
return PlaneBoundedVolumeListSceneQuery

CreatePlaneBoundedVolumeQuery() public method

Creates a PlaneBoundedVolumeListSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a PlaneBoundedVolumes region.
public CreatePlaneBoundedVolumeQuery ( PlaneBoundedVolumeList volumes, uint mask ) : PlaneBoundedVolumeListSceneQuery
volumes PlaneBoundedVolumeList PlaneBoundedVolumeList to use for the region query.
mask uint Custom user defined flags to use for the query.
return PlaneBoundedVolumeListSceneQuery

CreateRayQuery() public method

Creates a query to return objects found along the ray.
public CreateRayQuery ( ) : RaySceneQuery
return RaySceneQuery

CreateRayQuery() public method

Creates a query to return objects found along the ray.
public CreateRayQuery ( Ray ray ) : RaySceneQuery
ray Axiom.Math.Ray Ray to use for the intersection query.
return RaySceneQuery

CreateRayQuery() public method

Creates a query to return objects found along the ray.
public CreateRayQuery ( Ray ray, uint mask ) : RaySceneQuery
ray Axiom.Math.Ray Ray to use for the intersection query.
mask uint
return RaySceneQuery

CreateRibbonTrail() public method

public CreateRibbonTrail ( string name ) : RibbonTrail
name string
return RibbonTrail

CreateSceneNode() public method

Creates an instance of a SceneNode.
Note that this does not add the SceneNode to the scene hierarchy. This method is for convenience, since it allows an instance to be created for which the SceneManager is responsible for allocating and releasing memory, which is convenient in complex scenes.

To include the returned SceneNode in the scene, use the AddChild method of the SceneNode which is to be it's parent.

Note that this method takes no parameters, and the node created is unnamed (it is actually given a generated name, which you can retrieve if you want). If you wish to create a node with a specific name, call the alternative method which takes a name parameter.

public CreateSceneNode ( ) : SceneNode
return SceneNode

CreateSceneNode() public method

Creates an instance of a SceneNode with a given name.
Note that this does not add the SceneNode to the scene hierarchy. This method is for convenience, since it allows an instance to be created for which the SceneManager is responsible for allocating and releasing memory, which is convenient in complex scenes.

To include the returned SceneNode in the scene, use the AddChild method of the SceneNode which is to be it's parent.

Note that this method takes a name parameter, which makes the node easier to retrieve directly again later.

public CreateSceneNode ( string name ) : SceneNode
name string
return SceneNode

CreateShadowTextures() protected method

Internal method for creating shadow textures (texture-based shadows).
protected CreateShadowTextures ( ushort size, ushort count, PixelFormat format ) : void
size ushort
count ushort
format PixelFormat
return void

CreateSkyDomePlane() protected method

protected CreateSkyDomePlane ( BoxPlane plane, float curvature, float tiling, float distance, Quaternion orientation, string groupName ) : Axiom.Core.Mesh
plane BoxPlane
curvature float
tiling float
distance float
orientation Axiom.Math.Quaternion
groupName string
return Axiom.Core.Mesh

CreateSkyboxPlane() protected method

Utility method for creating the planes of a skybox.
protected CreateSkyboxPlane ( BoxPlane plane, float distance, Quaternion orientation, string groupName ) : Axiom.Core.Mesh
plane BoxPlane
distance float
orientation Axiom.Math.Quaternion
groupName string
return Axiom.Core.Mesh

CreateSphereRegionQuery() public method

Creates a SphereRegionSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a spherical region.
public CreateSphereRegionQuery ( ) : SphereRegionSceneQuery
return SphereRegionSceneQuery

CreateSphereRegionQuery() public method

Creates a SphereRegionSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a spherical region.
public CreateSphereRegionQuery ( Sphere sphere ) : SphereRegionSceneQuery
sphere Axiom.Math.Sphere Sphere to use for the region query.
return SphereRegionSceneQuery

CreateSphereRegionQuery() public method

Creates a SphereRegionSceneQuery for this scene manager.
This method creates a new instance of a query object for this scene manager, for querying for objects within a spherical region.
public CreateSphereRegionQuery ( Sphere sphere, uint mask ) : SphereRegionSceneQuery
sphere Axiom.Math.Sphere Sphere to use for the region query.
mask uint Custom user defined flags to use for the query.
return SphereRegionSceneQuery

CreateStaticGeometry() public method

Creates a StaticGeometry instance suitable for use with this SceneManager.
StaticGeometry is a way of batching up geometry into a more efficient form at the expense of being able to move it. Please read the StaticGeometry class documentation for full information.
public CreateStaticGeometry ( string name, int logLevel ) : StaticGeometry
name string The name to give the new object
logLevel int
return StaticGeometry

DeriveShadowCasterPass() protected method

Internal method for turning a regular pass into a shadow caster pass.
This is only used for texture shadows, basically we're trying to ensure that objects are rendered solid black. This method will usually return the standard solid black pass for all fixed function passes, but will merge in a vertex program and fudge the AutpoParamDataSource to set black lighting for passes with vertex programs.
protected DeriveShadowCasterPass ( Pass pass ) : Pass
pass Axiom.Graphics.Pass
return Axiom.Graphics.Pass

DeriveShadowReceiverPass() protected method

Internal method for turning a regular pass into a shadow receiver pass.
This is only used for texture shadows, basically we're trying to ensure that objects are rendered with a projective texture. This method will usually return a standard single-texture pass for all fixed function passes, but will merge in a vertex program for passes with vertex programs.
protected DeriveShadowReceiverPass ( Pass pass ) : Pass
pass Axiom.Graphics.Pass
return Axiom.Graphics.Pass

DestroyAllAnimationStates() public method

Removes all AnimationStates created using this SceneManager.
public DestroyAllAnimationStates ( ) : void
return void

DestroyAllAnimations() public method

Removes all animations created using this SceneManager.
public DestroyAllAnimations ( ) : void
return void

DestroyAllCameras() public method

Destroy all cameras managed by this SceneManager Method added with MovableObject Factories.
public DestroyAllCameras ( ) : void
return void

DestroyAllMovableObjects() public method

public DestroyAllMovableObjects ( ) : void
return void

DestroyAllMovableObjectsByType() public method

public DestroyAllMovableObjectsByType ( string typeName ) : void
typeName string
return void

DestroyAllOverlays() public method

Destroys all the overlays.
public DestroyAllOverlays ( ) : void
return void

DestroyAllStaticGeometry() public method

Destroy all StaticGeometry instances.
public DestroyAllStaticGeometry ( ) : void
return void

DestroyAnimation() public method

Destroys an Animation.
public DestroyAnimation ( string name ) : void
name string
return void

DestroyAnimationState() public method

Destroys an AnimationState.
public DestroyAnimationState ( string name ) : void
name string
return void

DestroyCamera() public method

public DestroyCamera ( Camera camera ) : void
camera Camera
return void

DestroyMovableObject() public method

public DestroyMovableObject ( Axiom.Core.MovableObject m ) : void
m Axiom.Core.MovableObject
return void

DestroyMovableObject() public method

public DestroyMovableObject ( string name, string typeName ) : void
name string
typeName string
return void

DestroyOverlay() public method

Destroys the named Overlay.
public DestroyOverlay ( string name ) : void
name string
return void

DestroySceneNode() public method

Destroys and removes a node from the scene.
public DestroySceneNode ( SceneNode node ) : void
node SceneNode A SceneNode
return void

DestroySceneNode() public method

Destroys and removes a node from the scene.
public DestroySceneNode ( string name ) : void
name string
return void

DestroyShadowTextures() protected method

protected DestroyShadowTextures ( ) : void
return void

DestroyStaticGeometry() public method

Remove & destroy a StaticGeometry instance.
public DestroyStaticGeometry ( StaticGeometry geom ) : void
geom StaticGeometry
return void

DestroyStaticGeometry() public method

Remove & destroy a StaticGeometry instance.
public DestroyStaticGeometry ( string name ) : void
name string
return void

EnsureShadowTexturesCreated() protected method

protected EnsureShadowTexturesCreated ( ) : void
return void

EstimateWorldGeometry() public method

Estimate the number of loading stages required to load the named world geometry.
Operates just like the version of this method which takes a filename, but operates on a stream instead. Note that since the stream is updated, you'll need to reset the stream or reopen it when it comes to loading it for real.
public EstimateWorldGeometry ( Stream stream ) : int
stream Stream Data stream containing data to load
return int

EstimateWorldGeometry() public method

Estimates the world geometry.
Operates just like the version of this method which takes a filename, but operates on a stream instead. Note that since the stream is updated, you'll need to reset the stream or reopen it when it comes to loading it for real.
public EstimateWorldGeometry ( Stream stream, string typeName ) : int
stream Stream Data stream containing data to load
typeName string Identifies the type of world geometry /// contained in the stream - not required if this manager only /// supports one type of world geometry.
return int

EstimateWorldGeometry() public method

Estimate the number of loading stages required to load the named world geometry.
This method should be overridden by SceneManagers that provide custom world geometry that can take some time to load. They should return from this method a count of the number of stages of progress they can report on whilst loading. During real loading (setWorldGeomtry), they should call exactly that number of times when loading the geometry for real.
public EstimateWorldGeometry ( string fileName ) : int
fileName string Name of the file.
return int

ExtractAllMovableObjectsByType() public method

public ExtractAllMovableObjectsByType ( string typeName ) : void
typeName string
return void

ExtractMovableObject() public method

public ExtractMovableObject ( Axiom.Core.MovableObject m ) : void
m Axiom.Core.MovableObject
return void

ExtractMovableObject() public method

public ExtractMovableObject ( string name, string typeName ) : void
name string
typeName string
return void

FindLightsAffectingFrustum() protected method

Internal method for locating a list of lights which could be affecting the frustum.
Custom scene managers are encouraged to override this method to make use of their scene partitioning scheme to more efficiently locate lights, and to eliminate lights which may be occluded by word geometry.
protected FindLightsAffectingFrustum ( Camera camera ) : void
camera Camera Camera to find lights within it's view.
return void

FindShadowCastersForLight() protected method

Internal method for locating a list of shadow casters which could be affecting the frustum for a given light.
Custom scene managers are encouraged to override this method to add optimizations, and to add their own custom shadow casters (perhaps for world geometry)
protected FindShadowCastersForLight ( Light light, Camera camera ) : IList
light Light
camera Camera
return IList

FindVisibleObjects() public method

Internal method which parses the scene to find visible objects to render.
If you're implementing a custom scene manager, this is the most important method to override since it's here you can apply your custom world partitioning scheme. Once you have added the appropriate objects to the render queue, you can let the default SceneManager objects RenderVisibleObjects handle the actual rendering of the objects you pick.

Any visible objects will be added to a rendering queue, which is indexed by material in order to ensure objects with the same material are rendered together to minimise render state changes.

public FindVisibleObjects ( Camera camera, bool onlyShadowCasters ) : void
camera Camera
onlyShadowCasters bool
return void

GetAnimation() public method

Retreives the animation with the specified name.
public GetAnimation ( string name ) : Animation
name string
return Axiom.Animating.Animation

GetAnimationState() public method

Retreives the AnimationState with the specified name.
public GetAnimationState ( string name ) : AnimationState
name string
return AnimationState

GetBillboardSet() public method

Retreives the BillboardSet with the specified name.
public GetBillboardSet ( string name ) : BillboardSet
name string
return BillboardSet

GetCamera() public method

Retreives the camera with the specified name.
public GetCamera ( string name ) : Camera
name string
return Camera

GetEntity() public method

Retreives the scene node with the specified name.
public GetEntity ( string name ) : Entity
name string
return Entity

GetLight() public method

Retreives the light with the specified name.
public GetLight ( string name ) : Light
name string
return Light

GetManualObject() public method

Retrieves the named ManualObject.
/// Thrown if the names does not exists in the collection. ///
public GetManualObject ( string name ) : ManualObject
name string /// The name of the object to retrieve. ///
return ManualObject

GetMaterial() public method

Returns the material with the specified handle.
public GetMaterial ( System.UInt64 handle ) : Material
handle System.UInt64 Handle of the material to retrieve.
return Axiom.Graphics.Material

GetMaterial() public method

Returns the material with the specified name.
public GetMaterial ( string name ) : Material
name string Name of the material to retrieve.
return Axiom.Graphics.Material

GetMovableObject() public method

public GetMovableObject ( string name, string typeName ) : Axiom.Core.MovableObject
name string
typeName string
return Axiom.Core.MovableObject

GetMovableObjectCollection() public method

public GetMovableObjectCollection ( string typeName ) : Axiom.Collections.MovableObjectCollection
typeName string
return Axiom.Collections.MovableObjectCollection

GetMovableText() public method

Retrieves the named MovableText.
/// Thrown if the names does not exists in the collection. ///
public GetMovableText ( string name ) : MovableText
name string /// The name of the object to retrieve. ///
return MovableText

GetOverlay() public method

Gets a the named Overlay, previously created using CreateOverlay.
public GetOverlay ( string name ) : Overlay
name string
return Axiom.Overlays.Overlay

GetRenderQueue() public method

Retrieves the internal render queue.
public GetRenderQueue ( ) : RenderQueue
return Axiom.Graphics.RenderQueue

GetRibbonTrail() public method

public GetRibbonTrail ( string name ) : RibbonTrail
name string
return RibbonTrail

GetSceneNode() public method

Retreives the scene node with the specified name.
public GetSceneNode ( string name ) : SceneNode
name string
return SceneNode

GetStaticGeometry() public method

Retrieve a previously created StaticGeometry instance.
public GetStaticGeometry ( string name ) : StaticGeometry
name string
return StaticGeometry

GetSuggestedViewpoint() public method

Asks the SceneManager to provide a suggested viewpoint from which the scene should be viewed.
Typically this method returns the origin unless a) world geometry has been loaded using SceneManager.LoadWorldGeometry and b) that world geometry has suggested 'start' points. If there is more than one viewpoint which the scene manager can suggest, it will always suggest the first one unless the random parameter is true.
public GetSuggestedViewpoint ( bool random ) : ViewPoint
random bool /// If true, and there is more than one possible suggestion, a random one will be used. If false /// the same one will always be suggested. ///
return ViewPoint

HasMovableObject() public method

public HasMovableObject ( string name, string typeName ) : bool
name string
typeName string
return bool

HasStaticGeometry() public method

Returns whether a static geometry instance with the given name exists. */
public HasStaticGeometry ( string name ) : bool
name string
return bool

InitRenderQueue() protected method

Internal method for initializing the render queue.
Subclasses can use this to install their own RenderQueue implementation.
protected InitRenderQueue ( ) : void
return void

InitShadowVolumeMaterials() protected method

Internal method for setting up materials for shadows.
protected InitShadowVolumeMaterials ( ) : void
return void

InjectMovableObject() public method

public InjectMovableObject ( MovableObject m ) : void
m MovableObject
return void

InjectRenderWithPass() public method

public InjectRenderWithPass ( Pass pass, IRenderable rend ) : void
pass Pass
rend IRenderable
return void

InjectRenderWithPass() public method

Render something as if it came from the current queue.
public InjectRenderWithPass ( Pass pass, IRenderable rend, bool shadowDerivation ) : void
pass Pass Material pass to use for setting up this quad.
rend IRenderable Renderable to render
shadowDerivation bool Whether passes should be replaced with shadow caster / receiver passes
return void

LoadWorldGeometry() public method

Loads the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc.
Depending on the type of SceneManager (subclasses will be specialized for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".
public LoadWorldGeometry ( string fileName ) : void
fileName string
return void

ManualRender() public method

public ManualRender ( RenderOperation op, Pass pass, Viewport vp, Matrix4 worldMatrix, Matrix4 viewMatrix, Matrix4 projMatrix ) : void
op RenderOperation
pass Pass
vp Viewport
worldMatrix Matrix4
viewMatrix Matrix4
projMatrix Matrix4
return void

ManualRender() public method

Manual rendering method, for advanced users only.
This method allows you to send rendering commands through the pipeline on demand, bypassing any normal world processing. You should only use this if you really know what you're doing; the engine does lots of things for you that you really should let it do. However, there are times where it may be useful to have this manual interface, for example overlaying something on top of the scene.

Because this is an instant rendering method, timing is important. The best time to call it is from a RenderTarget event handler.

Don't call this method a lot, it's designed for rare (1 or 2 times per frame) use. Calling it regularly per frame will cause frame rate drops!

public ManualRender ( RenderOperation op, Pass pass, Viewport vp, Matrix4 worldMatrix, Matrix4 viewMatrix, Matrix4 projMatrix, bool doBeginEndFrame ) : void
op RenderOperation A RenderOperation object describing the rendering op.
pass Pass The Pass to use for this render.
vp Viewport Reference to the viewport to render to.
worldMatrix Matrix4 The transform to apply from object to world space.
viewMatrix Matrix4 The transform to apply from object to view space.
projMatrix Matrix4 The transform to apply from view to screen space.
doBeginEndFrame bool /// If true, BeginFrame() and EndFrame() are called, otherwise not. /// You should leave this as false if you are calling this within the main render loop. ///
return void

NotifyLightsDirty() protected method

Advance method to increase the lights dirty counter due lights changed.
Scene manager tracking lights that affecting the frustum, if changes detected (the changes includes light list itself and the light's position and attenuation range), then increase the lights dirty counter. For some reason, you can call this method to force whole scene objects re-populate their light list. But near in mind, call to this method will harm performance, so should avoid if possible.
protected NotifyLightsDirty ( ) : void
return void

OnRenderQueueEnded() protected method

Used to first the QueueEnded event.
protected OnRenderQueueEnded ( RenderQueueGroupID group, string invocation ) : bool
group RenderQueueGroupID
invocation string
return bool

OnRenderQueueStarted() protected method

Used to first the QueueStarted event.
protected OnRenderQueueStarted ( RenderQueueGroupID group, string invocation ) : bool
group RenderQueueGroupID
invocation string
return bool

OverrideRootSceneNode() public method

If set, only the selected node is rendered. To render all nodes, set to null.
public OverrideRootSceneNode ( SceneNode node ) : void
node SceneNode
return void

PopulateLightList() public method

Populate a light list with an ordered set of the lights which are closest

Note that since directional lights have no position, they are always considered closer than any point lights and as such will always take precedence.

Subclasses of the default SceneManager may wish to take into account other issues such as possible visibility of the light if that information is included in their data structures. This basic scenemanager simply orders by distance, eliminating those lights which are out of range.

The number of items in the list max exceed the maximum number of lights supported by the renderer, but the extraneous ones will never be used. In fact the limit will be imposed by Pass::getMaxSimultaneousLights.

public PopulateLightList ( Vector3 position, float radius, LightList destList ) : void
position Vector3 The position at which to evaluate the list of lights
radius float The bounding radius to test
destList LightList List to be populated with ordered set of lights; will be cleared by this method before population.
return void

PrepareShadowTextures() protected method

Internal method for preparing shadow textures ready for use in a regular render
protected PrepareShadowTextures ( Camera camera, Viewport viewPort ) : void
camera Camera
viewPort Viewport
return void

PrepareWorldGeometry() public method

Sets the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc. This function can be called before setWorldGeometry in a background thread, do to some slow tasks (e.g. IO) that do not involve the backend render system.
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a stream to this method and it will attempt to load the world-level geometry for use. If the manager can only handle one input format the typeName parameter is not required. The stream passed will be read (and it's state updated).
public PrepareWorldGeometry ( Stream stream, string typeName ) : void
stream Stream Data stream containing data to load
typeName string String identifying the type of world geometry /// contained in the stream - not required if this manager only /// supports one type of world geometry. ///
return void

PrepareWorldGeometry() public method

Sets the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc. This function can be called before setWorldGeometry in a background thread, do to some slow tasks (e.g. IO) that do not involve the backend render system.
Depending on the type of SceneManager (subclasses will be specialised for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".
public PrepareWorldGeometry ( string filename ) : void
filename string
return void

RekeySceneNode() public method

public RekeySceneNode ( string oldName, SceneNode node ) : void
oldName string
node SceneNode
return void

RemoveAllBillboardSets() public method

Removes all billboardsets from the scene.
public RemoveAllBillboardSets ( ) : void
return void

RemoveAllCameras() public method

Removes all cameras from the scene.
public RemoveAllCameras ( ) : void
return void

RemoveAllEntities() public method

Removes all entities from the scene.
public RemoveAllEntities ( ) : void
return void

RemoveAllLights() public method

Removes all lights from the scene.
public RemoveAllLights ( ) : void
return void

RemoveAllRibonTrails() public method

public RemoveAllRibonTrails ( ) : void
return void

RemoveBillboardSet() public method

Removes the specified BillboardSet from the scene.
This method removes a previously added BillboardSet from the scene.
public RemoveBillboardSet ( BillboardSet billboardSet ) : void
billboardSet BillboardSet Reference to the BillboardSet to remove.
return void

RemoveBillboardSet() public method

Removes a BillboardSet from the scene with the specified name.
This method removes a previously added BillboardSet from the scene.
public RemoveBillboardSet ( string name ) : void
name string Name of the BillboardSet to remove.
return void

RemoveCamera() public method

Removes the specified camera from the scene.
This method removes a previously added camera from the scene.
public RemoveCamera ( Camera camera ) : void
camera Camera Reference to the camera to remove.
return void

RemoveCamera() public method

Removes a camera from the scene with the specified name.
This method removes a previously added camera from the scene.
public RemoveCamera ( string name ) : void
name string Name of the camera to remove.
return void

RemoveEntity() public method

Removes the specified entity from the scene.
public RemoveEntity ( Entity entity ) : void
entity Entity Entity to remove from the scene.
return void

RemoveEntity() public method

Removes the entity with the specified name from the scene.
public RemoveEntity ( string name ) : void
name string Entity to remove from the scene.
return void

RemoveLight() public method

Removes the specified light from the scene.
This method removes a previously added light from the scene.
public RemoveLight ( Light light ) : void
light Light Reference to the light to remove.
return void

RemoveLight() public method

Removes a light from the scene with the specified name.
This method removes a previously added light from the scene.
public RemoveLight ( string name ) : void
name string Name of the light to remove.
return void

RemoveRibbonTrail() public method

public RemoveRibbonTrail ( RibbonTrail ribbonTrail ) : void
ribbonTrail RibbonTrail
return void

RemoveRibbonTrail() public method

public RemoveRibbonTrail ( string name ) : void
name string
return void

RenderAdditiveStencilShadowedQueueGroupObjects() protected method

Render a group with the added complexity of additive stencil shadows.
protected RenderAdditiveStencilShadowedQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Render queue group.
return void

RenderBasicQueueGroupObjects() protected method

Render a group in the ordinary way
protected RenderBasicQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Group containing the objects to render.
return void

RenderModulativeStencilShadowedQueueGroupObjects() protected method

Render a group with the added complexity of modulative stencil shadows.
protected RenderModulativeStencilShadowedQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Render queue group.
return void

RenderModulativeTextureShadowedQueueGroupObjects() protected method

Render a group with the added complexity of modulative texture shadows.
protected RenderModulativeTextureShadowedQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Render queue group.
return void

RenderQueueGroupObjects() protected method

Render the objects in a given queue group.
protected RenderQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Group containing the objects to render.
return void

RenderScene() protected method

Prompts the class to send its contents to the renderer.
This method prompts the scene manager to send the contents of the scene it manages to the rendering pipeline, possibly preceded by some sorting, culling or other scene management tasks. Note that this method is not normally called directly by the user application; it is called automatically by the engine's rendering loop.
protected RenderScene ( Camera camera, Viewport viewport, bool showOverlays ) : void
camera Camera Pointer to a camera from whose viewpoint the scene is to be rendered.
viewport Viewport The target viewport
showOverlays bool Whether or not any overlay objects should be rendered
return void

RenderShadowVolumesToStencil() protected method

Internal method for rendering all the objects for a given light into the stencil buffer.
protected RenderShadowVolumesToStencil ( Light light, Camera camera ) : void
light Light The light source.
camera Camera The camera being viewed from.
return void

RenderSingleObject() protected method

protected RenderSingleObject ( IRenderable renderable, Pass pass, bool doLightIteration ) : void
renderable IRenderable
pass Pass
doLightIteration bool
return void

RenderSingleObject() protected method

Internal utility method for rendering a single object.
protected RenderSingleObject ( IRenderable renderable, Pass pass, bool doLightIteration, LightList manualLightList ) : void
renderable IRenderable The renderable to issue to the pipeline.
pass Pass The pass which is being used.
doLightIteration bool If true, this method will issue the renderable to /// the pipeline possibly multiple times, if the pass indicates it should be /// done once per light.
manualLightList LightList Only applicable if 'doLightIteration' is false, this /// method allows you to pass in a previously determined set of lights /// which will be used for a single render of this object.
return void

RenderSingleShadowVolumeToStencil() protected method

Render a single shadow volume to the stencil buffer.
protected RenderSingleShadowVolumeToStencil ( ShadowRenderable sr, bool zfail, bool stencil2sided, LightList manualLightList, bool isSecondPass ) : void
sr ShadowRenderable
zfail bool
stencil2sided bool
manualLightList LightList
isSecondPass bool
return void

RenderSolidObjects() protected method

protected RenderSolidObjects ( System list, bool doLightIteration ) : void
list System
doLightIteration bool
return void

RenderSolidObjects() protected method

Renders a set of solid objects.
protected RenderSolidObjects ( System list, bool doLightIteration, LightList manualLightList ) : void
list System
doLightIteration bool
manualLightList LightList
return void

RenderTextureShadowCasterQueueGroupObjects() protected method

Render a group rendering only shadow casters.
protected RenderTextureShadowCasterQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Render queue group.
return void

RenderTextureShadowReceiverQueueGroupObjects() protected method

Render a group rendering only shadow receivers.
protected RenderTextureShadowReceiverQueueGroupObjects ( RenderQueueGroup group ) : void
group RenderQueueGroup Render queue group.
return void

RenderTransparentObjects() protected method

protected RenderTransparentObjects ( List list, bool doLightIteration ) : void
list List
doLightIteration bool
return void

RenderTransparentObjects() protected method

Renders a set of transparent objects.
protected RenderTransparentObjects ( List list, bool doLightIteration, LightList manualLightList ) : void
list List
doLightIteration bool
manualLightList LightList
return void

RenderTransparentShadowCasterObjects() protected method

Render those objects in the transparent pass list which have shadow casting forced on
This function is intended to be used to render the shadows of transparent objects which have transparency_casts_shadows set to 'on' in their material
protected RenderTransparentShadowCasterObjects ( List list, bool doLightIteration, LightList manualLightList ) : void
list List
doLightIteration bool
manualLightList LightList
return void

RenderVisibleObjects() protected method

Sends visible objects found in FindVisibleObjects to the rendering engine.
protected RenderVisibleObjects ( ) : void
return void

ResetViewProjectionMode() public method

public ResetViewProjectionMode ( ) : void
return void

RestoreRootSceneNode() public method

public RestoreRootSceneNode ( ) : void
return void

SceneManager() public method

public SceneManager ( string name ) : System
name string
return System

SetFog() public method

public SetFog ( FogMode mode, ColorEx color, float density ) : void
mode FogMode
color ColorEx
density float
return void

SetFog() public method

Sets the fogging mode applied to the scene.
This method sets up the scene-wide fogging effect. These settings apply to all geometry rendered, UNLESS the material with which it is rendered has it's own fog settings (see Material.SetFog).
public SetFog ( FogMode mode, ColorEx color, float density, float linearStart, float linearEnd ) : void
mode FogMode Set up the mode of fog as described in the FogMode /// enum, or set to FogMode.None to turn off.
color ColorEx The color of the fog. Either set this to the same /// as your viewport background color, or to blend in with a skydome or skybox.
density float The density of the fog in Exp or Exp2. /// mode, as a value between 0 and 1. The default is 0.001.
linearStart float Distance in world units at which linear fog starts to /// encroach. Only applicable if mode is
linearEnd float Distance in world units at which linear fog becomes completely /// opaque. Only applicable if mode is
return void

SetPass() public method

If only the first parameter is supplied
public SetPass ( Pass pass ) : Pass
pass Pass
return Pass

SetPass() public method

If only the first two parameters are supplied
public SetPass ( Pass pass, bool evenIfSuppressed ) : Pass
pass Pass
evenIfSuppressed bool
return Pass

SetPass() public method

Internal method for setting up the renderstate for a rendering pass.
public SetPass ( Pass pass, bool evenIfSuppressed, bool shadowDerivation ) : Pass
pass Pass The Pass details to set.
evenIfSuppressed bool /// Sets the pass details even if render state /// changes are suppressed; if you are using this to manually set state /// when render state changes are suppressed, you should set this to true. ///
shadowDerivation bool /// If false, disables the derivation of shadow passes from original passes ///
return Pass

SetShadowTextureSettings() public method

public SetShadowTextureSettings ( ushort size, ushort count ) : void
size ushort
count ushort
return void

SetShadowTextureSettings() public method

Sets the size and count of textures used in texture-based shadows.
See ShadowTextureSize and ShadowTextureCount for details, this method just allows you to change both at once, which can save on reallocation if the textures have already been created.
public SetShadowTextureSettings ( ushort size, ushort count, PixelFormat format ) : void
size ushort
count ushort
format PixelFormat
return void

SetShadowVolumeStencilState() protected method

Internal utility method for setting stencil state for rendering shadow volumes.
protected SetShadowVolumeStencilState ( bool secondPass, bool zfail, bool twoSided ) : void
secondPass bool Is this the second pass?
zfail bool Should we be using the zfail method?
twoSided bool Should we use a 2-sided stencil?
return void

SetSkyBox() public method

Overloaded method.
public SetSkyBox ( bool enable, string materialName, float distance ) : void
enable bool
materialName string
distance float
return void

SetSkyBox() public method

Enables / disables a 'sky box' i.e. a 6-sided box at constant distance from the camera representing the sky.
You could create a sky box yourself using the standard mesh and entity methods, but this creates a plane which the camera can never get closer or further away from - it moves with the camera. (you could create this effect by creating a world box which was attached to the same SceneNode as the Camera too, but this would only apply to a single camera whereas this skybox applies to any camera using this scene manager).

The material you use for the skybox can either contain layers which are single textures, or they can be cubic textures, i.e. made up of 6 images, one for each plane of the cube. See the TextureLayer class for more information.

public SetSkyBox ( bool enable, string materialName, float distance, bool drawFirst, Quaternion orientation, string groupName ) : void
enable bool True to enable the skybox, false to disable it
materialName string The name of the material the box will use.
distance float Distance in world coordinates from the camera to each plane of the box.
drawFirst bool /// If true, the box is drawn before all other /// geometry in the scene, without updating the depth buffer. /// This is the safest rendering method since all other objects /// will always appear in front of the sky. However this is not /// the most efficient way if most of the sky is often occluded /// by other objects. If this is the case, you can set this /// parameter to false meaning it draws after all other /// geometry which can be an optimisation - however you must /// ensure that the distance value is large enough that no /// objects will 'poke through' the sky box when it is rendered. ///
orientation Quaternion /// Specifies the orientation of the box. By default the 'top' of the box is deemed to be /// in the +y direction, and the 'front' at the -z direction. /// You can use this parameter to rotate the sky if you want. ///
groupName string
return void

SetSkyDome() public method

public SetSkyDome ( bool isEnabled, string materialName, float curvature, float tiling ) : void
isEnabled bool
materialName string
curvature float
tiling float
return void

SetSkyDome() public method

public SetSkyDome ( bool isEnabled, string materialName, float curvature, float tiling, float distance, bool drawFirst, Quaternion orientation, string groupName ) : void
isEnabled bool
materialName string
curvature float
tiling float
distance float
drawFirst bool
orientation Quaternion
groupName string
return void

SetSkyPlane() public method

Overload.
public SetSkyPlane ( bool enable, Plane plane, string materialName ) : void
enable bool
plane Plane
materialName string
return void

SetSkyPlane() public method

Enables / disables a 'sky plane' i.e. a plane at constant distance from the camera representing the sky.
public SetSkyPlane ( bool enable, Plane plane, string materialName, float scale, float tiling, bool drawFirst, float bow, string groupName ) : void
enable bool True to enable the plane, false to disable it.
plane Plane Details of the plane, i.e. it's normal and it's distance from the camera.
materialName string The name of the material the plane will use.
scale float The scaling applied to the sky plane - higher values mean a bigger sky plane.
tiling float How many times to tile the texture across the sky.
drawFirst bool /// If true, the plane is drawn before all other geometry in the scene, without updating the depth buffer. /// This is the safest rendering method since all other objects /// will always appear in front of the sky. However this is not /// the most efficient way if most of the sky is often occluded /// by other objects. If this is the case, you can set this /// parameter to false meaning it draws after all other /// geometry which can be an optimisation - however you must /// ensure that the plane.d value is large enough that no objects /// will 'poke through' the sky plane when it is rendered. ///
bow float /// If above zero, the plane will be curved, allowing /// the sky to appear below camera level. Curved sky planes are /// simular to skydomes, but are more compatable with fog. ///
groupName string
return void

SetViewport() protected method

Internal method for setting the destination viewport for the next render.
protected SetViewport ( Viewport viewport ) : void
viewport Viewport
return void

SetWorldGeometry() public method

public SetWorldGeometry ( Stream stream ) : void
stream Stream
return void

SetWorldGeometry() public method

public SetWorldGeometry ( Stream stream, string typeName ) : void
stream Stream
typeName string
return void

SetWorldGeometry() public method

public SetWorldGeometry ( string filename ) : void
filename string
return void

UpdateSceneGraph() protected method

Internal method for updating the scene graph ie the tree of SceneNode instances managed by this class.
This must be done before issuing objects to the rendering pipeline, since derived transformations from parent nodes are not updated until required. This SceneManager is a basic implementation which simply updates all nodes from the root. This ensures the scene is up to date but requires all the nodes to be updated even if they are not visible. Subclasses could trim this such that only potentially visible nodes are updated.
protected UpdateSceneGraph ( Camera camera ) : void
camera Camera
return void

UseRenderableViewProjection() protected method

Protected method used by RenderVisibleObjects to deal with renderables which override the camera's own view / projection materices.
protected UseRenderableViewProjection ( IRenderable renderable ) : void
renderable IRenderable
return void

ValidatePassForRendering() protected method

Internal method to validate whether a Pass should be allowed to render.
Called just before a pass is about to be used for rendering a group to allow the SceneManager to omit it if required. A return value of false skips this pass.
protected ValidatePassForRendering ( Pass pass ) : bool
pass Pass
return bool

ValidateRenderableForRendering() protected method

Internal method to validate whether a Renderable should be allowed to render.
Called just before a pass is about to be used for rendering a Renderable to allow the SceneManager to omit it if required. A return value of false skips it.
protected ValidateRenderableForRendering ( Pass pass, IRenderable renderable ) : bool
pass Pass
renderable IRenderable
return bool

dispose() protected method

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
return void

Property Details

_activeCompositorChain protected_oe property

protected CompositorChain _activeCompositorChain
return CompositorChain

_lightsDirtyCounter protected_oe property

protected ulong _lightsDirtyCounter
return ulong

ambientColor protected_oe property

The ambient color, cached from the RenderSystem
Default to a semi-bright white (gray) light to prevent being null
protected ColorEx ambientColor
return ColorEx

animationList protected_oe property

A list of animations for easy lookup.
protected AnimationCollection animationList
return AnimationCollection

animationStateList protected_oe property

A list of animation states for easy lookup.
protected AnimationStateSet animationStateList
return AnimationStateSet

autoParamDataSource protected_oe property

Utility class for updating automatic GPU program params.
protected AutoParamDataSource autoParamDataSource
return AutoParamDataSource

autoTrackingSceneNodes protected_oe property

Active list of nodes tracking other nodes.
protected SceneNodeCollection autoTrackingSceneNodes
return SceneNodeCollection

cameraInProgress protected_oe property

A reference to the current camera being used for rendering.
protected Camera cameraInProgress
return Camera

cameraList protected_oe property

A list of the valid cameras for this scene for easy lookup.
protected CameraCollection cameraList
return CameraCollection

currentViewport protected_oe property

protected Viewport currentViewport
return Viewport

defaultRootNode protected_oe property

If set, only this scene node (and children) will be rendered. If null, root node is used.
protected SceneNode defaultRootNode
return SceneNode

displayNodes protected_oe property

Flag indicating whether SceneNodes will be rendered as a set of 3 axes.
protected bool displayNodes
return bool

findVisibleObjects protected_oe property

Find visible objects?
protected bool findVisibleObjects
return bool

finiteExtrusionParams protected_oe property

Program parameters for finite extrusion programs.
protected GpuProgramParameters finiteExtrusionParams
return GpuProgramParameters

fogColor protected_oe property

protected ColorEx fogColor
return ColorEx

fogDensity protected_oe property

protected float fogDensity
return float

fogEnd protected_oe property

protected float fogEnd
return float

fogMode protected_oe property

protected FogMode fogMode
return FogMode

fogStart protected_oe property

protected float fogStart
return float

fullScreenQuad protected_oe property

Full screen rectangle to use for rendering stencil shadows.
protected Rectangle2D fullScreenQuad
return Rectangle2D

hasCameraChanged protected_oe property

Denotes whether or not the camera has been changed.
protected bool hasCameraChanged
return bool

illuminationStage protected_oe property

Current stage of rendering.
protected IlluminationRenderStage illuminationStage
return IlluminationRenderStage

infiniteExtrusionParams protected_oe property

Program parameters for infinite extrusion programs.
protected GpuProgramParameters infiniteExtrusionParams
return GpuProgramParameters

isSkyBoxDrawnFirst protected_oe property

protected bool isSkyBoxDrawnFirst
return bool

isSkyBoxEnabled protected_oe property

protected bool isSkyBoxEnabled
return bool

isSkyDomeDrawnFirst protected_oe property

protected bool isSkyDomeDrawnFirst
return bool

isSkyDomeEnabled protected_oe property

protected bool isSkyDomeEnabled
return bool

isSkyPlaneDrawnFirst protected_oe property

protected bool isSkyPlaneDrawnFirst
return bool

isSkyPlaneEnabled protected_oe property

protected bool isSkyPlaneEnabled
return bool

lastFrameNumber protected_oe property

protected ulong lastFrameNumber
return ulong

lastNumTexUnitsUsed protected_oe static_oe property

protected static int lastNumTexUnitsUsed
return int

lastPolyMode protected_oe property

protected PolygonMode lastPolyMode
return PolygonMode

lastProjectionWasIdentity protected_oe property

protected bool lastProjectionWasIdentity
return bool

lastUsedFallback protected_oe property

protected bool lastUsedFallback
return bool

lastViewWasIdentity protected_oe property

protected bool lastViewWasIdentity
return bool

lightsAffectingFrustum protected_oe property

List of lights in view that could cast shadows.
protected LightList lightsAffectingFrustum
return LightList

localLightList protected_oe static_oe property

Local light list for use during rendering passes.
protected static LightList localLightList
return LightList

movableObjectCollectionMap protected_oe property

protected Dictionary movableObjectCollectionMap
return MovableObjectCollection>.Dictionary

name protected_oe property

The instance name of this scene manager.
protected string name
return string

normalizeNormals protected_oe static_oe property

Whether normals are currently being normalized.
protected static bool normalizeNormals
return bool

nullLightList protected_oe property

protected LightList nullLightList
return LightList

nullShadowTexture protected_oe property

protected Texture nullShadowTexture
return Texture

oldFogColor protected_oe static_oe property

protected static ColorEx oldFogColor
return ColorEx

oldFogDensity protected_oe static_oe property

protected static float oldFogDensity
return float

oldFogEnd protected_oe static_oe property

protected static float oldFogEnd
return float

oldFogMode protected_oe static_oe property

protected static FogMode oldFogMode
return FogMode

oldFogStart protected_oe static_oe property

protected static float oldFogStart
return float

op protected_oe static_oe property

protected static RenderOperation op
return RenderOperation

optionList protected_oe property

Hashtable of options that can be used by this or any other scene manager.
protected AxiomCollection optionList
return AxiomCollection

regionList protected_oe property

A list of the Regions. TODO: Is there any point to having this region list?
protected List regionList
return List

renderQueue protected_oe property

A queue of objects for rendering.
protected RenderQueue renderQueue
return RenderQueue

renderingMainGroup protected_oe property

True when the main priority group is rendering.
protected bool renderingMainGroup
return bool

renderingNoShadowQueue protected_oe property

True when calling RenderSolidObjects with the noShadow queue.
protected bool renderingNoShadowQueue
return bool

rootSceneNode protected_oe property

The root of the scene graph heirarchy.
protected SceneNode rootSceneNode
return SceneNode

sceneNodeList protected_oe property

A list of scene nodes (includes all in the scene graph).
protected SceneNodeCollection sceneNodeList
return SceneNodeCollection

shadowCameraLightMapping protected_oe property

protected Dictionary shadowCameraLightMapping
return Light>.Dictionary

shadowCasterAABBQuery protected_oe property

AxisAlignedBox region query to find shadow casters within the attenuation range of a directional light.
protected AxisAlignedBoxRegionSceneQuery shadowCasterAABBQuery
return AxisAlignedBoxRegionSceneQuery

shadowCasterList protected_oe property

Current list of shadow casters within the view of the camera.
protected List shadowCasterList
return List

shadowCasterPlainBlackPass protected_oe property

A pass designed to let us render shadow colour on white for texture shadows
protected Pass shadowCasterPlainBlackPass
return Pass

shadowCasterQueryListener protected_oe property

Listener to use when finding shadow casters for a light within a scene.
protected ShadowCasterSceneQueryListener shadowCasterQueryListener
return ShadowCasterSceneQueryListener

shadowCasterSphereQuery protected_oe property

Sphere region query to find shadow casters within the attenuation range of a point/spot light.
protected SphereRegionSceneQuery shadowCasterSphereQuery
return SphereRegionSceneQuery

shadowColor protected_oe property

protected ColorEx shadowColor
return ColorEx

shadowDebugPass protected_oe property

Pass to use for rendering debug shadows.
protected Pass shadowDebugPass
return Pass

shadowDirLightExtrudeDist protected_oe property

Explicit extrusion distance for directional lights.
protected float shadowDirLightExtrudeDist
return float

shadowFarDistance protected_oe property

Farthest distance from the camera at which to render shadows.
protected float shadowFarDistance
return float

shadowFarDistanceSquared protected_oe property

shadowFarDistance ^ 2
protected float shadowFarDistanceSquared
return float

shadowIndexBuffer protected_oe property

buffer to use for indexing shadow geometry required for certain techniques.
protected HardwareIndexBuffer shadowIndexBuffer
return HardwareIndexBuffer

shadowIndexBufferSize protected_oe property

The maximum size of the index buffer used to render shadow primitives.
protected int shadowIndexBufferSize
return int

shadowMaterialInitDone protected_oe property

For the RenderTextureShadowCasterQueueGroupObjects and RenderTextureShadowReceiverQueueGroupObjects methods.
protected bool shadowMaterialInitDone
return bool

shadowModulativePass protected_oe property

Pass to use while rendering the full screen quad for modulative shadows.
protected Pass shadowModulativePass
return Pass

shadowReceiverPass protected_oe property

A pass designed to let us render shadow receivers for texture shadows
protected Pass shadowReceiverPass
return Pass

shadowStencilPass protected_oe property

protected Pass shadowStencilPass
return Pass

shadowTechnique protected_oe property

Current shadow technique in use in the scene.
protected ShadowTechnique shadowTechnique
return ShadowTechnique

shadowTextureCameras protected_oe property

Current list of shadow texture cameras. There is one camera for each shadow texture.
protected List shadowTextureCameras
return List

shadowTextureCasterMaterial protected_oe property

The material file to be use for shadow casters, if any
protected string shadowTextureCasterMaterial
return string

shadowTextureConfigDirty protected_oe property

protected bool shadowTextureConfigDirty
return bool

shadowTextureConfigList protected_oe property

protected List shadowTextureConfigList
return List

shadowTextureCount protected_oe property

protected ushort shadowTextureCount
return ushort

shadowTextureCustomCasterFPParams protected_oe property

The parameters of the pixel program that renders custom shadow casters, or null
protected GpuProgramParameters shadowTextureCustomCasterFPParams
return GpuProgramParameters

shadowTextureCustomCasterFragmentProgram protected_oe property

The name of the pixel program that renders custom shadow casters, or null
protected string shadowTextureCustomCasterFragmentProgram
return string

shadowTextureCustomCasterPass protected_oe property

The pass that renders custom texture casters, or null
protected Pass shadowTextureCustomCasterPass
return Pass

shadowTextureCustomCasterVPParams protected_oe property

The parameters of the vertex program that renders custom shadow casters, or null
protected GpuProgramParameters shadowTextureCustomCasterVPParams
return GpuProgramParameters

shadowTextureCustomCasterVertexProgram protected_oe property

The name of the vertex program that renders custom shadow casters, or null
protected string shadowTextureCustomCasterVertexProgram
return string

shadowTextureCustomReceiverFPParams protected_oe property

The parameters of the pixel program that renders custom shadow casters, or null
protected GpuProgramParameters shadowTextureCustomReceiverFPParams
return GpuProgramParameters

shadowTextureCustomReceiverFragmentProgram protected_oe property

The name of the pixel program that renders custom shadow receivers, or null
protected string shadowTextureCustomReceiverFragmentProgram
return string

shadowTextureCustomReceiverPass protected_oe property

The material file to be use for shadow receivers, if any
protected Pass shadowTextureCustomReceiverPass
return Pass

shadowTextureCustomReceiverVPParams protected_oe property

The parameters of the vertex program that renders custom shadow casters, or null
protected GpuProgramParameters shadowTextureCustomReceiverVPParams
return GpuProgramParameters

shadowTextureCustomReceiverVertexProgram protected_oe property

The name of the vertex program that renders custom shadow receivers, or null
protected string shadowTextureCustomReceiverVertexProgram
return string

shadowTextureFadeEnd protected_oe property

As a proportion e.g. 0.9
protected float shadowTextureFadeEnd
return float

shadowTextureFadeStart protected_oe property

As a proportion e.g. 0.6
protected float shadowTextureFadeStart
return float

shadowTextureFormat protected_oe property

protected PixelFormat shadowTextureFormat
return PixelFormat

shadowTextureOffset protected_oe property

Proportion of texture offset in view direction e.g. 0.4
protected float shadowTextureOffset
return float

shadowTextureReceiverMaterial protected_oe property

The material file to be use for shadow receivers, if any
protected string shadowTextureReceiverMaterial
return string

shadowTextureSelfShadow protected_oe property

The default implementation of texture shadows uses a fixed-function color texture projection approach for maximum compatibility, and as such cannot support self-shadowing. However, if you decide to implement a more complex shadowing technique using ShadowTextureCasterMaterial and ShadowTextureReceiverMaterial there is a possibility you may be able to support self-shadowing (e.g by implementing a shader-based shadow map). In this case you might want to enable this option.
protected bool shadowTextureSelfShadow
return bool

shadowTextureSize protected_oe property

protected ushort shadowTextureSize
return ushort

shadowTextures protected_oe property

Current list of shadow textures.
protected List shadowTextures
return List

shadowUseInfiniteFarPlane protected_oe property

Whether we should override far distance when using stencil volumes
protected bool shadowUseInfiniteFarPlane
return bool

showBoundingBoxes protected_oe property

Flag that specifies whether scene nodes will have their bounding boxes rendered as a wire frame.
protected bool showBoundingBoxes
return bool

showDebugShadows protected_oe property

If true, shadow volumes will be visible in the scene.
protected bool showDebugShadows
return bool

skyBoxEntities protected_oe property

protected Entity[] skyBoxEntities
return Entity[]

skyBoxNode protected_oe property

protected SceneNode skyBoxNode
return SceneNode

skyBoxOrientation protected_oe property

protected Quaternion skyBoxOrientation
return Quaternion

skyDomeEntities protected_oe property

protected Entity[] skyDomeEntities
return Entity[]

skyDomeNode protected_oe property

protected SceneNode skyDomeNode
return SceneNode

skyDomeOrientation protected_oe property

protected Quaternion skyDomeOrientation
return Quaternion

skyPlane protected_oe property

protected Plane skyPlane
return Plane

skyPlaneEntity protected_oe property

protected Entity skyPlaneEntity
return Entity

skyPlaneNode protected_oe property

protected SceneNode skyPlaneNode
return SceneNode

specialCaseRenderQueueList protected_oe property

A List of RenderQueues to either Include or Exclude in the rendering sequence.
protected SpecialCaseRenderQueue specialCaseRenderQueueList
return SpecialCaseRenderQueue

staticGeometryList protected_oe property

The list of static geometry instances maintained by the scene manager
protected Dictionary staticGeometryList
return StaticGeometry>.Dictionary

suppressRenderStateChanges protected_oe property

Suppress render state changes?
protected bool suppressRenderStateChanges
return bool

suppressShadows protected_oe property

Suppress shadows?
protected bool suppressShadows
return bool

targetRenderSystem protected_oe property

A reference to the current active render system..
protected RenderSystem targetRenderSystem
return RenderSystem

visibilityMask protected_oe property

Used by compositing layer
protected ulong visibilityMask
return ulong

worldGeometryRenderQueueId protected_oe property

protected RenderQueueGroupID worldGeometryRenderQueueId
return RenderQueueGroupID

xform protected_oe property

protected Matrix4[] xform
return Matrix4[]