Esempio n. 1
0
        private void GetDrawElements(List <DrawElement> elements, SceneGraphNode parent)
        {
            if (parent.DrawnParts.Count > 0)
            {
                elements.AddRange(parent.DrawnParts);
            }

            foreach (var node in parent.Children)
            {
                GetDrawElements(elements, node);
            }
        }
Esempio n. 2
0
        private void Read(FileReader reader)
        {
            reader.SetByteOrder(true);
            Version          = reader.ReadByte();
            InternalName     = reader.ReadString(0x0B);
            TextureOffset    = reader.ReadUInt32();
            SamplerOffset    = reader.ReadUInt32();
            PositionOffset   = reader.ReadUInt32();
            NormalOffset     = reader.ReadUInt32();
            Attribute1Offset = reader.ReadUInt32();
            Attribute2Offset = reader.ReadUInt32();
            TexCoordOffset   = reader.ReadUInt32();
            Attribute3Offset = reader.ReadUInt32();
            Attribute4Offset = reader.ReadUInt32();
            Attribute5Offset = reader.ReadUInt32();

            MaterialOffset   = reader.ReadUInt32();
            ShapeBatchOffset = reader.ReadUInt32();
            SceneGraphOffset = reader.ReadUInt32();

            SceneRoot = ReadSection <SceneGraphNode>(reader, 0);
            OrderLists();
        }
Esempio n. 3
0
 public void AddChild(SceneGraphNode sceneGraph)
 {
     sceneGraph.Parent = this;
     Children.Add(sceneGraph);
 }