예제 #1
0
 public void LoadFormatsNode(FormatsNode verticesNode)
 {
     foreach (var vertex in verticesNode.Properties)
     {
         vertices.Add(vertex.Attributes);
     }
 }
예제 #2
0
        public void LoadFormatsNode(FormatsNode shaderNode)
        {
            spsName = shaderNode.Name;

            foreach (var shaderParam in shaderNode.Properties)
            {
            }
        }
예제 #3
0
 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));
         }
     }
 }
예제 #4
0
        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));
            }
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        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);
            }
        }
예제 #7
0
 public void LoadFormatsNode(FormatsNode boundNode)
 {
     min = Formats.GetVector3Property(boundNode, "Min");
     max = Formats.GetVector3Property(boundNode, "Max");
 }