当前位置: 首页>>代码示例>>C#>>正文


C# Camera.NotifyViewport方法代码示例

本文整理汇总了C#中Axiom.Core.Camera.NotifyViewport方法的典型用法代码示例。如果您正苦于以下问题:C# Camera.NotifyViewport方法的具体用法?C# Camera.NotifyViewport怎么用?C# Camera.NotifyViewport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Axiom.Core.Camera的用法示例。


在下文中一共展示了Camera.NotifyViewport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Viewport

        /// <summary>
        ///		The constructor. Dimensions of the viewport are expressed as a pecentage between
        ///		0 and 100. This allows the dimensions to apply irrespective of
        ///		changes in the target's size: e.g. to fill the whole area,
        ///		values of 0,0,100,100 are appropriate.
        /// </summary>
        /// <param name="camera">Reference to the camera to be the source for the image.</param>
        /// <param name="target">Reference to the render target to be the destination for the rendering.</param>
        /// <param name="left">Left</param>
        /// <param name="top">Top</param>
        /// <param name="width">Width</param>
        /// <param name="height">Height</param>
        /// <param name="zOrder">Relative Z-order on the target. Lower = further to the front.</param>
        public Viewport(Camera camera, RenderTarget target, float left, float top, float width, float height, int zOrder)
        {
            Debug.Assert(camera != null, "Cannot use a null Camera to create a viewport.");
            Debug.Assert(target != null, "Cannor use a null RenderTarget to create a viewport.");

            LogManager.Instance.Write("Creating viewport rendering from camera '{0}', relative dimensions L:{1},T:{2},W:{3},H:{4}, Z-Order:{5}",
                camera.Name, left, top, width, height, zOrder);

            this.camera = camera;
            this.target = target;
            this.zOrder = zOrder;

            relativeLeft = left;
            relativeTop = top;
            relativeWidth = width;
            relativeHeight = height;

            backColor = ColorEx.Black;
            clearEveryFrame = true;
            clearBuffers = FrameBuffer.Color | FrameBuffer.Depth;

            // Calculate actual dimensions
            UpdateDimensions();

            isUpdated = true;
            showOverlays = true;
            showSkies = true;
            showShadows = true;

            materialSchemeName = MaterialManager.DefaultSchemeName;

            // notify camera
            camera.NotifyViewport(this);
        }
开发者ID:ufosky-server,项目名称:MultiversePlatform,代码行数:47,代码来源:Viewport.cs

示例2: Viewport

		/// <summary>
		///		The constructor. Dimensions of the viewport are expressed as a pecentage between
		///		0 and 100. This allows the dimensions to apply irrespective of
		///		changes in the target's size: e.g. to fill the whole area,
		///		values of 0,0,100,100 are appropriate.
		/// </summary>
		/// <param name="camera">Reference to the camera to be the source for the image.</param>
		/// <param name="target">Reference to the render target to be the destination for the rendering.</param>
		/// <param name="left">Left</param>
		/// <param name="top">Top</param>
		/// <param name="width">Width</param>
		/// <param name="height">Height</param>
		/// <param name="zOrder">Relative Z-order on the target. Lower = further to the front.</param>
		public Viewport( Camera camera, RenderTarget target, float left, float top, float width, float height, int zOrder )
			: base()
		{
			LogManager.Instance.Write(
				"Creating viewport rendering from camera '{0}', relative dimensions L:{1},T:{2},W:{3},H:{4}, Z-Order:{5}",
				camera.Name, left, top, width, height, zOrder );

			Camera = camera;
			Target = target;

			Left = left;
			Top = top;
			Width = width;
			Height = height;

			ZOrder = zOrder;

			BackgroundColor = ColorEx.Black;

			ClearDepth = 1.0;
			ClearEveryFrame = true;
			ClearBuffers = FrameBufferType.Color | FrameBufferType.Depth;

			IsUpdated = false;
			ShowOverlays = true;
			ShowSkies = true;
			ShowShadows = true;

			VisibilityMask = 0xFFFFFFFFu;

			IsAutoUpdated = true;

			OrientationMode = DefaultOrientationMode;

			// MaterialScheme = MaterialManager.DefaultSchemeName;
			MaterialScheme = Root.Instance.RenderSystem.DefaultViewportMaterialScheme;

			// Calculate actual dimensions
			UpdateDimensions();

			// notify camera
			if ( camera != null )
			{
				camera.NotifyViewport( this );
			}
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:59,代码来源:Viewport.cs


注:本文中的Axiom.Core.Camera.NotifyViewport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。