Exemplo n.º 1
0
        public void Draw(Scene scene, Node node, Camera camera)
        {
            if (Visible)
            {
                Mesh.Draw(node, camera, Material, scene.Lights);
            }

            if (DrawBounding)
            {
                Mesh.DrawBounding(ref node.WorldMatrix, ref camera.View, ref camera.Projection);
            }
        }
Exemplo n.º 2
0
        public void Draw(Scene scene, Node node, Camera camera)
        {
            if (Visible)
            {
                int index = 0;

                //Mesh.Draw(node, camera, Materials[index], MeshParts[index]); return;

                foreach (Material material in Materials)
                {
                    Mesh.Draw(node, camera, material, Mesh.MeshParts[index], scene.Lights);

                    index++;
                }
            }

            if (DrawBounding)
            {
                Mesh.DrawBounding(ref node.WorldMatrix, ref camera.View, ref camera.Projection);
            }
        }