Exemplo n.º 1
0
 /// <summary>
 /// Add a <see cref="SceneGraphObject"/> as child of this instance.
 /// </summary>
 /// <param name="sceneGraphObject">
 /// The <see cref="SceneGraphObject"/> to be included in the children list of this instance.
 /// </param>
 public override void AddChild(SceneGraphObject sceneGraphObject)
 {
     // Base implementation
     base.AddChild(sceneGraphObject);
     // Set default view
     if ((_CurrentView == null) && (sceneGraphObject is SceneGraphCameraObject))
     {
         _CurrentView = (SceneGraphCameraObject)sceneGraphObject;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="currentView"></param>
        public SceneGraphContext(SceneGraph sceneGraph, SceneGraphCameraObject currentView)
        {
            if (sceneGraph == null)
            {
                throw new ArgumentNullException("sceneGraph");
            }
            if (currentView == null)
            {
                throw new ArgumentNullException("currentView");
            }

            Scene       = sceneGraph;
            CurrentView = currentView;
        }