Пример #1
0
 /// <summary>
 /// Adds a child to this node in the scene graph.
 /// </summary>
 /// <param name="child"></param>
 public void AddChild( SceneGraphNode child )
 {
     children.Add( child );
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of SceneGraph.
        /// </summary>
        public SceneGraph( Renderer renderer )
        {
            if ( renderer == null )
            {
                Log.Write( "Can't create a SceneGraph with a null Renderer reference." );
                throw new ArgumentNullException( "renderer",
                    "Can't create a SceneGraph with a null Renderer reference." );
            }

            this.renderer = renderer;

            root = new SceneGraphNode( this.renderer, this );
        }