예제 #1
0
파일: Mesh.cs 프로젝트: quangfox/AllInOne
        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);
            }
        }
예제 #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);
            }
        }