Utility class for controlling the camera in samples.
Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        protected override void SetupView()
        {
            // setup default viewport layout and camera
            this.Camera             = SceneManager.CreateCamera("MainCamera");
            this.Viewport           = Window.AddViewport(this.Camera);
            this.Camera.AspectRatio = (Real)this.Viewport.ActualWidth / (Real)this.Viewport.ActualHeight;
            this.Camera.Near        = 5;

            this.CameraManager = new SdkCameraManager(this.Camera);               // create a default camera controller
        }
Exemple #2
0
        public SdkSample()
        {
            // so we don't have to worry about checking if these keys exist later
            Metadata["Title"]       = "Untitled";
            Metadata["Description"] = String.Empty;
            Metadata["Category"]    = "Unsorted";
            Metadata["Thumbnail"]   = String.Empty;
            Metadata["Help"]        = String.Empty;

            this.TrayManager   = null;
            this.CameraManager = null;
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        public override void Shutdown()
        {
            base.Shutdown();

            if (this.TrayManager != null)
            {
                this.TrayManager.Dispose();
            }
            if (this.CameraManager != null)
            {
                this.CameraManager = null;
            }

            // restore settings we may have changed, so as not to affect other samples
            MaterialManager.Instance.SetDefaultTextureFiltering(TextureFiltering.Bilinear);
            MaterialManager.Instance.DefaultAnisotropy = 1;
        }
Exemple #4
0
		/// <summary>
		/// 
		/// </summary>
		protected override void SetupView()
		{
			// setup default viewport layout and camera
			this.Camera = SceneManager.CreateCamera( "MainCamera" );
			this.Viewport = Window.AddViewport( this.Camera );
			this.Camera.AspectRatio = (Real)this.Viewport.ActualWidth / (Real)this.Viewport.ActualHeight;
			this.Camera.Near = 5;

			this.CameraManager = new SdkCameraManager( this.Camera );   // create a default camera controller
		}
Exemple #5
0
		/// <summary>
		/// 
		/// </summary>
		public override void Shutdown()
		{
			base.Shutdown();

			if ( this.TrayManager != null )
				this.TrayManager.Dispose();
			if ( this.CameraManager != null )
				this.CameraManager = null;

			// restore settings we may have changed, so as not to affect other samples
			MaterialManager.Instance.SetDefaultTextureFiltering( TextureFiltering.Bilinear );
			MaterialManager.Instance.DefaultAnisotropy = 1;
		}
Exemple #6
0
		public SdkSample()
		{
			// so we don't have to worry about checking if these keys exist later
			Metadata[ "Title" ] = "Untitled";
			Metadata[ "Description" ] = String.Empty;
			Metadata[ "Category" ] = "Unsorted";
			Metadata[ "Thumbnail" ] = String.Empty;
			Metadata[ "Help" ] = String.Empty;

			this.TrayManager = null;
			this.CameraManager = null;
		}