Beispiel #1
0
 /// <summary>
 /// Static constructor.
 /// </summary>
 static SceneObject()
 {
     // Static initialization
     SceneGraph.Touch();
     SceneObjectCamera.Touch();
     SceneObjectGeometry.Touch();
     SceneObjectLight.Touch();
     SceneObjectLightZone.Touch();
 }
Beispiel #2
0
        public SceneGraphContext(SceneGraph sceneGraph, SceneObjectCamera currentView)
        {
            if (sceneGraph == null)
            {
                throw new ArgumentNullException("sceneGraph");
            }

            Scene       = sceneGraph;
            CurrentView = currentView;
        }
Beispiel #3
0
 /// <summary>
 /// Add a <see cref="SceneObject"/> as child of this instance.
 /// </summary>
 /// <param name="sceneGraphObject">
 /// The <see cref="SceneObject"/> to be included in the children list of this instance.
 /// </param>
 public override void Link(SceneObject sceneGraphObject)
 {
     // Base implementation
     base.Link(sceneGraphObject);
     // Set default view
     if ((_CurrentView == null) && (sceneGraphObject is SceneObjectCamera))
     {
         _CurrentView = (SceneObjectCamera)sceneGraphObject;
     }
 }