public UrdfMaterial(XElement node) { Name = (string)node.Attribute("name"); // required Color = (node.Element("color") != null) ? new UrdfColor(node.Element("color")) : null; // optional Texture = (node.Element("texture") != null) ? new UrdfTexture(node.Element("texture")) : null; Filename = Path.GetFileNameWithoutExtension(Name); }
public UrdfMaterial() { Name = null; Color = null; Texture = null; Filename = "Default"; }