Esempio n. 1
0
 private static IEnumerable <VertexElementLayout> LoadLayoutElements(XContainer container)
 {
     // Element tags have the format:
     // <value stream="(stream)" offset="(offset)" type="(type)" usage="(usage)" usageIndex="(usage index)" />
     return(from element in container.Elements("value")
            select new VertexElementLayout(
                XMLUtil.GetNumericAttribute(element, "stream"),
                XMLUtil.GetNumericAttribute(element, "offset"),
                XMLUtil.GetEnumAttribute <VertexElementType>(element, "type"),
                XMLUtil.GetEnumAttribute <VertexElementUsage>(element, "usage"),
                XMLUtil.GetNumericAttribute(element, "usageIndex")));
 }