public void Parse(string text) { var parts = text.Split(','); if (parts.Length != 4 * 4) { throw new FormatException("mat requires 12 float values delimited by commas"); } var m11 = float.Parse(parts[0], CultureInfo.InvariantCulture); var m12 = float.Parse(parts[1], CultureInfo.InvariantCulture); var m13 = float.Parse(parts[2], CultureInfo.InvariantCulture); var m14 = float.Parse(parts[3], CultureInfo.InvariantCulture); var m21 = float.Parse(parts[4], CultureInfo.InvariantCulture); var m22 = float.Parse(parts[5], CultureInfo.InvariantCulture); var m23 = float.Parse(parts[6], CultureInfo.InvariantCulture); var m24 = float.Parse(parts[7], CultureInfo.InvariantCulture); var m31 = float.Parse(parts[8], CultureInfo.InvariantCulture); var m32 = float.Parse(parts[9], CultureInfo.InvariantCulture); var m33 = float.Parse(parts[10], CultureInfo.InvariantCulture); var m34 = float.Parse(parts[11], CultureInfo.InvariantCulture); var m41 = float.Parse(parts[12], CultureInfo.InvariantCulture); var m42 = float.Parse(parts[13], CultureInfo.InvariantCulture); var m43 = float.Parse(parts[14], CultureInfo.InvariantCulture); var m44 = float.Parse(parts[15], CultureInfo.InvariantCulture); this._Value = new FileFormats.Matrix4x4(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); }
void PropertyContainerFile.IRawVariant.Deserialize(Stream input, Endian endian) { this._Value = FileFormats.Matrix4x4.Read(input, endian); }