private MetaFloat4_XYZ ReadFloatXYZ(XmlNode node) { var floatVectorValue = new MetaFloat4_XYZ(); floatVectorValue.X = float.Parse(node.Attributes["x"].Value); floatVectorValue.Y = float.Parse(node.Attributes["y"].Value); floatVectorValue.Z = float.Parse(node.Attributes["z"].Value); return(floatVectorValue); }
private void WriteFloatXYZContent(XmlWriter writer, MetaFloat4_XYZ floatVectorValue) { var s1 = string.Format(CultureInfo.InvariantCulture, "{0:0.0###########}", floatVectorValue.X); var s2 = string.Format(CultureInfo.InvariantCulture, "{0:0.0###########}", floatVectorValue.Y); var s3 = string.Format(CultureInfo.InvariantCulture, "{0:0.0###########}", floatVectorValue.Z); writer.WriteAttributeString("x", s1); writer.WriteAttributeString("y", s2); writer.WriteAttributeString("z", s3); }
public void AssertFloatVector(MetaFloat4_XYZ expectedFloat, MetaFloat4_XYZ actualFloat) { Assert.AreEqual(expectedFloat.X, actualFloat.X); Assert.AreEqual(expectedFloat.Y, actualFloat.Y); Assert.AreEqual(expectedFloat.Z, actualFloat.Z); }