Containers and Components

Objects in Engine Nine is grouped into a tree structure called scene tree. The root node of the tree should always be a Scene. A node in the scene tree can be an arbitrary .NET object. But in order for a node to contain child nodes, the type of that node has to implement Nine.IContainer, which contains a list of child nodes:

public interface IContainer
    IList Children { get; }
In order to get the parent node, the object can implement Nine.IComponent interface, that contains a property to access parent container object.
public interface IComponent
    IContainer Parent { get; set; }
There are several built-in types of containers and components: Group, Scene, Transformable, Component

Last edited Sep 22, 2012 at 11:12 AM by yufeih, version 3


No comments yet.