public void LoadFormatsNode(FormatsNode verticesNode) { foreach (var vertex in verticesNode.Properties) { vertices.Add(vertex.Attributes); } }
public void LoadFormatsNode(FormatsNode shaderNode) { spsName = shaderNode.Name; foreach (var shaderParam in shaderNode.Properties) { } }
public void LoadFormatsNode(FormatsNode indicesNode) { //int alignment = 15; foreach (var indicesLine in indicesNode.Properties) { foreach (var index in indicesLine.Attributes) { indices.Add(ushort.Parse(index)); } } }
public void LoadFormatsNode(FormatsNode lodNode) { drawDistance = float.Parse(lodNode.Attributes[1]); foreach (var pairNode in lodNode.Properties) { Model model = new Model(); model.LoadFormatsFile(Path.Combine(Path.GetDirectoryName(lodNode.FileName), pairNode.Attributes[0])); byte boneIndex = byte.Parse(pairNode.Attributes[1]); models.Add(new Tuple <Model, byte>(model, boneIndex)); } }
public void LoadFormatsNode(FormatsNode lodGroupNode) { center = Formats.GetVector3Property(lodGroupNode, "Center"); radius = Formats.GetFloatProperty(lodGroupNode, "Radius"); aabbMin = Formats.GetVector3Property(lodGroupNode, "AABBMin"); aabbMax = Formats.GetVector3Property(lodGroupNode, "AABBMax"); var lodHighNode = lodGroupNode.Properties.FirstOrDefault(n => n.Name == "High"); if (lodHighNode != null) { lodHigh = new Lod(); lodHigh.LoadFormatsNode(lodHighNode); } var lodMedNode = lodGroupNode.Properties.FirstOrDefault(n => n.Name == "Med"); if (lodMedNode != null) { lodMed = new Lod(); lodMed.LoadFormatsNode(lodMedNode); } var lodLowNode = lodGroupNode.Properties.FirstOrDefault(n => n.Name == "Low"); if (lodLowNode != null) { lodLow = new Lod(); lodLow.LoadFormatsNode(lodLowNode); } var lodVLowNode = lodGroupNode.Properties.FirstOrDefault(n => n.Name == "Vlow"); if (lodVLowNode != null) { lodVlow = new Lod(); lodVlow.LoadFormatsNode(lodVLowNode); } }
public void LoadFormatsNode(FormatsNode geometryNode) { ShaderIndex = Formats.GetUshortProperty(geometryNode, "ShaderIndex"); Flags = Formats.GetFlagsProperty(geometryNode, "Flags"); VertexDeclaration = Formats.GetStringProperty(geometryNode, "VertexDeclaration"); var indicesNode = geometryNode.Properties.FirstOrDefault(n => n.Name == "Indices"); if (indicesNode != null) { var count = Formats.GetIntProperty(geometryNode, "Indices"); Indices = new IndexBuffer(count); Indices.LoadFormatsNode(indicesNode); } var verticesNode = geometryNode.Properties.FirstOrDefault(n => n.Name == "Vertices"); if (verticesNode != null) { var count = Formats.GetIntProperty(geometryNode, "Vertices"); Vertices = new VertexBuffer(count); Vertices.LoadFormatsNode(verticesNode); } }
public void LoadFormatsNode(FormatsNode boundNode) { min = Formats.GetVector3Property(boundNode, "Min"); max = Formats.GetVector3Property(boundNode, "Max"); }