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


C# VRageMath.ToVector3方法代码示例

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


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

示例1: ClearBackbuffer

 public void ClearBackbuffer(VRageMath.Color clearColor)
 {
     var v3 = clearColor.ToVector3();
     MyRender.Device.Clear(ClearFlags.Target, new ColorBGRA(v3.X, v3.Y, v3.Z, 1) , 1, 0);
 }
开发者ID:ChristianHeinz71,项目名称:SpaceEngineers,代码行数:5,代码来源:MyDX9Render.cs

示例2: ClearBackbuffer

        internal static void ClearBackbuffer(VRageMath.Color clearColor)
        {
            if(Backbuffer != null)
			{
				var v3 = clearColor.ToVector3();
                DeviceContext.ClearRenderTargetView((Backbuffer as IRenderTargetBindable).RTV, new Color4(v3.X, v3.Y, v3.Z, 1));            
			}
        }
开发者ID:Chrus,项目名称:SpaceEngineers,代码行数:8,代码来源:MyRender-SwapChain.cs

示例3: Clear

        internal void Clear(VRageMath.Color clearColor)
        {
            MyRender11.DeviceContext.ClearDepthStencilView(DepthStencil.m_DSV,
                DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, MyRender11.DepthClearValue, 0);

            foreach(var res in m_resources)
            {
                var rt = res as IRenderTargetBindable;
                if(rt != null)
				{
					var v3 = clearColor.ToVector3();
                    MyRender11.DeviceContext.ClearRenderTargetView(rt.RTV,
						new Color4(v3.X, v3.Y, v3.Z,1
							));
				}

                var uav = res as IUnorderedAccessBindable;
                if (uav != null)
                    MyRender11.DeviceContext.ClearUnorderedAccessView(uav.UAV, Int4.Zero);
            }
        }
开发者ID:Chrus,项目名称:SpaceEngineers,代码行数:21,代码来源:MyGbuffer.cs

示例4: Clear

        internal void Clear(VRageMath.Color clearColor)
        {
            RC.ClearDsv(DepthStencil,
                DepthStencilClearFlags.Depth | DepthStencilClearFlags.Stencil, MyRender11.DepthClearValue, 0);

			var v3 = clearColor.ToVector3();
            RC.ClearRtv(m_gbuffer0, new Color4(v3.X, v3.Y, v3.Z, 1));
            RC.ClearRtv(m_gbuffer1, Color4.Black);
            RC.ClearRtv(m_gbuffer2, Color4.Black);
            RC.ClearRtv(m_lbuffer, Color4.Black);
    
        }
开发者ID:rem02,项目名称:SpaceEngineers,代码行数:12,代码来源:MyGbuffer.cs


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