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


C# IGraphicsService.GetDefaultTexture2DWhite方法代码示例

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


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

示例1: TerrainMaterialLayer

        //--------------------------------------------------------------
        /// <overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="TerrainMaterialLayer"/> class.
        /// </summary>
        /// </overloads>
        /// 
        /// <summary>
        /// Initializes a new instance of the <see cref="TerrainMaterialLayer"/> class with the default
        /// material.
        /// </summary>
        /// <param name="graphicService">The graphic service.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="graphicService"/> is <see langword="null"/>.
        /// </exception>
        public TerrainMaterialLayer(IGraphicsService graphicService)
        {
            if (graphicService == null)
            throw new ArgumentNullException("graphicService");

              var effect = graphicService.Content.Load<Effect>("DigitalRune/Terrain/TerrainMaterialLayer");
              Material = new Material
              {
            { "Detail", new EffectBinding(graphicService, effect, null, EffectParameterHint.Material) }
              };

              FadeOutStart = int.MaxValue;
              FadeOutEnd = int.MaxValue;
              TileSize = 1;
              DiffuseColor = new Vector3F(1, 1, 1);
              SpecularColor = new Vector3F(1, 1, 1);
              SpecularPower = 10;
              Alpha = 1;
              DiffuseTexture = graphicService.GetDefaultTexture2DWhite();
              SpecularTexture = graphicService.GetDefaultTexture2DBlack();
              NormalTexture = graphicService.GetDefaultNormalTexture();
              HeightTextureScale = 1;
              HeightTextureBias = 0;
              HeightTexture = graphicService.GetDefaultTexture2DBlack();
              TriplanarTightening = -1;
              TintStrength = 1;
              TintTexture = graphicService.GetDefaultTexture2DWhite();
              BlendThreshold = 0.5f;
              BlendRange = 1f;
              BlendHeightInfluence = 0;
              BlendNoiseInfluence = 0;
              BlendTextureChannel = 0;
              BlendTexture = graphicService.GetDefaultTexture2DWhite();
              NoiseTileSize = 1;
              TerrainHeightMin = -1e20f;
              TerrainHeightMax = +1e20f;
              TerrainHeightBlendRange = 1f;
              TerrainSlopeMin = -ConstantsF.Pi;
              TerrainSlopeMax = ConstantsF.Pi;
              TerrainSlopeBlendRange = MathHelper.ToRadians(10);
        }
开发者ID:Zolniu,项目名称:DigitalRune,代码行数:56,代码来源:TerrainMaterialLayer.cs

示例2: TerrainRoadLayer

        //--------------------------------------------------------------
        /// <overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="TerrainRoadLayer"/> class.
        /// </summary>
        /// </overloads>
        /// 
        /// <summary>
        /// Initializes a new instance of the <see cref="TerrainRoadLayer"/> class with the default
        /// material.
        /// </summary>
        /// <param name="graphicService">The graphic service.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="graphicService"/> is <see langword="null"/>.
        /// </exception>
        public TerrainRoadLayer(IGraphicsService graphicService)
        {
            if (graphicService == null)
            throw new ArgumentNullException("graphicService");

              var effect = graphicService.Content.Load<Effect>("DigitalRune/Terrain/TerrainRoadLayer");
              Material = new Material
              {
            { "Detail", new EffectBinding(graphicService, effect, null, EffectParameterHint.Material) }
              };

              FadeOutStart = int.MaxValue;
              FadeOutEnd = int.MaxValue;
              TileSize = 1;
              DiffuseColor = new Vector3F(1, 1, 1);
              SpecularColor = new Vector3F(1, 1, 1);
              SpecularPower = 10;
              Alpha = 1;
              DiffuseTexture = graphicService.GetDefaultTexture2DWhite();
              SpecularTexture = graphicService.GetDefaultTexture2DBlack();
              NormalTexture = graphicService.GetDefaultNormalTexture();
              HeightTextureScale = 1;
              HeightTexture = graphicService.GetDefaultTexture2DBlack();
              RoadLength = 1;
        }
开发者ID:Zolniu,项目名称:DigitalRune,代码行数:40,代码来源:TerrainRoadLayer.cs

示例3: TerrainDecalLayer

        //--------------------------------------------------------------
        /// <overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="TerrainDecalLayer"/> class.
        /// </summary>
        /// </overloads>
        /// 
        /// <summary>
        /// Initializes a new instance of the <see cref="TerrainDecalLayer"/> class with the default
        /// material.
        /// </summary>
        /// <param name="graphicService">The graphic service.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="graphicService"/> is <see langword="null"/>.
        /// </exception>
        public TerrainDecalLayer(IGraphicsService graphicService)
        {
            if (graphicService == null)
            throw new ArgumentNullException("graphicService");

              // Use a down orientation per default.
              Pose = new Pose(Matrix33F.CreateRotationX(-ConstantsF.PiOver2));

              var effect = graphicService.Content.Load<Effect>("DigitalRune/Terrain/TerrainDecalLayer");
              Material = new Material
              {
            { "Detail", new EffectBinding(graphicService, effect, null, EffectParameterHint.Material) }
              };

              FadeOutStart = int.MaxValue;
              FadeOutEnd = int.MaxValue;
              Width = 1;
              Height = 1;
              DiffuseColor = new Vector3F(1, 1, 1);
              SpecularColor = new Vector3F(1, 1, 1);
              SpecularPower = 10;
              Alpha = 1;
              DiffuseTexture = graphicService.GetDefaultTexture2DWhite();
              SpecularTexture = graphicService.GetDefaultTexture2DBlack();
              NormalTexture = graphicService.GetDefaultNormalTexture();
              HeightTextureScale = 1;
              HeightTexture = graphicService.GetDefaultTexture2DBlack();

              UpdateAabb();
        }
开发者ID:Zolniu,项目名称:DigitalRune,代码行数:45,代码来源:TerrainDecalLayer.cs


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