Пример #1
0
        public void Parse(string text)
        {
            var parts = text.Split(',');

            if (parts.Length != 4)
            {
                throw new FormatException("vec4 requires 2 float values delimited by commas");
            }

            var x = float.Parse(parts[0], CultureInfo.InvariantCulture);
            var y = float.Parse(parts[1], CultureInfo.InvariantCulture);
            var z = float.Parse(parts[2], CultureInfo.InvariantCulture);
            var w = float.Parse(parts[3], CultureInfo.InvariantCulture);

            this._Value = new FileFormats.Vector4(x, y, z, w);
        }
Пример #2
0
 void PropertyContainerFile.IRawVariant.Deserialize(Stream input, Endian endian)
 {
     this._Value = FileFormats.Vector4.Read(input, endian);
 }