Exemplo n.º 1
0
        /// <summary>
        /// Creates a new MT5Node instance from the given model node.
        /// </summary>
        public MT5Node(ModelNode node, MT5Node parent = null, MT5 mt5 = null)
        {
            MT5 = mt5;

            ID       = node.ID;
            Rotation = node.Rotation;
            Position = node.Position;
            Scale    = node.Scale;

            Center = node.Center;
            Radius = node.Radius;

            VertexPositions = node.VertexPositions;
            VertexNormals   = node.VertexNormals;
            VertexUVs       = node.VertexUVs;
            VertexColors    = node.VertexColors;

            Faces = node.Faces;

            MeshData = new MT5Mesh(node, this);
            if (node.Child != null)
            {
                Child = new MT5Node(node.Child, this, mt5);
            }
            if (node.Sibling != null)
            {
                Sibling = new MT5Node(node.Sibling, this, mt5);
            }
            Parent = parent;
        }
Exemplo n.º 2
0
 public MT5Node(BinaryReader reader, MT5Node parent, MT5 mt5 = null)
 {
     MT5 = mt5;
     Read(reader, parent);
 }