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


C# Vector4.ToString方法代码示例

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


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

示例1: OverrideLoadedProperties

        public override void OverrideLoadedProperties()
        {
            base.OverrideLoadedProperties();

            /* should be set by engine, so reset properties works as expected */
            _alphaAnimationComponent = Components.First(c => c.Id == AlphaAnimationComponentId) as PropertyAnimationComponent;
            _alphaAnimationComponent.Property = "StarColor";
            _alphaAnimationComponent.StartValue = StarColor.ToString().Replace("(", string.Empty).Replace(")", string.Empty);

            var stopColor = new Vector4(StarColor.X, StarColor.Y, StarColor.Z, 0);

            _alphaAnimationComponent.StopValue = stopColor.ToString().Replace("(", string.Empty).Replace(")", string.Empty);
            _alphaAnimationComponent.DurationSeconds = 0.5f;

            _rotationAnimationComponent = Components.First(c => c.Id == RotationAnimationComponentId) as PropertyAnimationComponent;
            _rotationAnimationComponent.Property = "Rotation";
            _rotationAnimationComponent.StartValue = new Vector3(0, 0, this.Rotation.Z).ToString().Replace("(", string.Empty).Replace(")", string.Empty);
            _rotationAnimationComponent.StopValue = new Vector3(0, 6.28f / 2f, this.Rotation.Z).ToString().Replace("(", string.Empty).Replace(")", string.Empty);
            _rotationAnimationComponent.DurationSeconds = 0.5f;

            DistanceSorting = true;

            _grabbed = false;

            _flare.Position = this.WorldPosition;
        }
开发者ID:BaldMan82,项目名称:iGL,代码行数:26,代码来源:Star.cs

示例2: Vector4ToStringTest

        public void Vector4ToStringTest()
        {
            Vector4 target = new Vector4(-1.0f, 2.2f, 3.3f, -4.4f);

            string expected = "{X:-1 Y:2.2 Z:3.3 W:-4.4}";
            string actual;
            actual = target.ToString();
            Assert.AreEqual(expected, actual, "Vector4.ToString did not return the expected value.");
        }
开发者ID:fengweijp,项目名称:Win2D,代码行数:9,代码来源:Vector4Test.cs

示例3: TestMemberFn_ToString_i

        public void TestMemberFn_ToString_i ()
        {
            Vector4 a = new Vector4(42, -17, 13, 44);

            String result = a.ToString();

            String expected = "{X:42 Y:-17 Z:13 W:44}";

            Assert.That(result, Is.EqualTo(expected));
        }
开发者ID:sungiant,项目名称:abacus,代码行数:10,代码来源:Abacus.Double.Tests.cs

示例4: GetShapeArray

 public float[] GetShapeArray(string filename, Vector4 color, bool inverted)
 {
     if (!shapeArrayDict.ContainsKey(filename + color.ToString()))
     {
         shapeArrayDict[filename + color.ToString()] = modelReader.GetFloatArray(filename, color, inverted);
         //Debug.WriteLine("Made a dict entry: " + filename+color.ToString());
     }
     return shapeArrayDict[filename + color.ToString()];
 }
开发者ID:philyum,项目名称:TheAmazingFishy,代码行数:9,代码来源:Assets.cs

示例5: ColorVec4ToVector4

 public static Vector4 ColorVec4ToVector4(Vector4 color)
 {
     #if DEBUG
     Console.WriteLine(color.ToString() + " -> " + new Vector4((color.X / 255), (color.Y / 255), (color.Z / 255), (color.W / 255)).ToString());
     #endif
     return new Vector4((color.X / 255), (color.Y / 255), (color.Z / 255), (color.W / 255));
 }
开发者ID:Erlisch,项目名称:Caliginous,代码行数:7,代码来源:Misc.cs


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