| IScene Interface |
Manages a collection of 3D objects represented by scene nodes (a.k.a the "scene graph").
Namespace: DigitalRune.Graphics.SceneGraphAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public interface class IScene
type IScene = interface end
The IScene type exposes the following members.
Methods
| Name | Description |
---|
| HaveContact |
Determines whether bounding shapes of two scene nodes overlap.
|
| QueryT |
Gets the scene nodes that touch the specified reference node.
|
TopProperties Remarks
A IScene manages a collection of SceneNodes. A scene node
usually represents an instance of a graphics object (a mesh, a camera, a light, etc.).
A scene has two important purposes:
-
Scene Graph
-
The main purpose is to organize the objects in a 3D scene. Graphics objects (such as meshes,
cameras, lights, etc.) are represented by scene nodes. Scene nodes are organized in a
hierarchy: Each scene node can have a Parent and zero or more
Children. The resulting hierarchy is a tree (a graph without cycles) -
usually called the scene graph. See class SceneNode to find out more on
how to place objects within a scene.
-
Scene Queries
-
The second purpose is to execute queries against the scene. For example, when rendering a
scene it is important to quickly access all scene nodes that are within the camera frustum.
When an object is lit, it is important to quickly get all lights that affect the object. A
scene query is run by calling the method QueryT(SceneNode, RenderContext). The type parameter of the
method specifies the type of the query. See method QueryT(SceneNode, RenderContext) and interface
ISceneQuery for more information.
The scene graph is the organization of the scene nodes that is visible to the application
logic. But internally, a scene can organize scene nodes in a way which is optimal for
rendering. Different types of scenes might require different implementations: For example,
indoor levels, outdoor levels, top-down views, side-scrolling games, etc. might require
different data structures in order to enable efficient queries. Therefore, different
applications can use different implementations of IScene.
The default implementation Scene internally uses a CollisionDomain
with a DualPartitionT to accelerate scene queries.
See Also