/// <summary> /// Adds a child to this node in the scene graph. /// </summary> /// <param name="child"></param> public void AddChild( SceneGraphNode child ) { children.Add( child ); }
/// <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 ); }