/// <summary> /// Static constructor. /// </summary> static SceneObject() { // Static initialization SceneGraph.Touch(); SceneObjectCamera.Touch(); SceneObjectGeometry.Touch(); SceneObjectLight.Touch(); SceneObjectLightZone.Touch(); }
public SceneGraphContext(SceneGraph sceneGraph, SceneObjectCamera currentView) { if (sceneGraph == null) { throw new ArgumentNullException("sceneGraph"); } Scene = sceneGraph; CurrentView = currentView; }
/// <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; } }