Exemple #1
0
        public void Draw(Scene scene, Node node, Camera camera)
        {
            if (Visible)
            {
                if (scene != null)
                {
                    Mesh.Draw(node, camera, Material, scene.Lights);
                }
                else
                {
                    Mesh.Draw(node, camera, Material);
                }
            }

            if (DrawBounding)
            {
                Mesh.DrawBounding(ref node.WorldMatrix, ref camera.View, ref camera.Projection);
            }
        }
        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);
            }
        }