Example #1
0
        public void Load()
        {
            Size clSize = Program.Window.ClientSize;

            camera = new ChaseCamera(clSize.Width / (float)clSize.Height);
            camera.ChaseDirection        = new Vector3(0, 0, 1);
            camera.ChasePosition         = new Vector3(0, 0, 0);
            camera.DesiredPositionOffset = new Vector3(0, 0, 40);
            camera.Mode         = RenderMode.Final;
            camera.FarPlane     = 10000;
            camera.NearPlane    = 10f;
            camera.RenderTarget = renderSys.GetRenderTarget(0);

            distance = 40;
            yang     = MathEx.Degree2Radian(30);
            xang     = MathEx.Degree2Radian(45);

            sceneManager = new SceneManager();
            SceneRendererParameter sm = new SceneRendererParameter();

            sm.PostRenderer = new DefaultPostRenderer();
            sm.SceneManager = sceneManager;
            sm.UseShadow    = false;


            renderer = new SceneRenderer(renderSys, sm);

            renderer.RegisterCamera(camera);

            obj = new ModelWrapper();

            sceneManager.AddObjectToScene(obj);

            //ModelData mdlData = PathBuilder.BuildModel(renderSys, null, new Point[]
            //{
            //    new Point(0,0), new Point(2,1), new Point(4,4), new Point(5,4), new Point(6,5), new Point(6,7), new Point(9,9)
            //});

            //CurrentModel = new Model(new ResourceHandle<ModelData>(mdlData, true));
        }
Example #2
0
        public void Load()
        {
            Size clSize = Program.Window.ClientSize;

            camera = new ChaseCamera(clSize.Width / (float)clSize.Height);
            camera.ChaseDirection        = new Vector3(0, 0, 1);
            camera.ChasePosition         = new Vector3(0, 0, 0);
            camera.DesiredPositionOffset = new Vector3(0, 0, 40);
            camera.Mode         = RenderMode.Final;
            camera.FarPlane     = 1000;
            camera.NearPlane    = 0.5f;
            camera.RenderTarget = renderSys.GetRenderTarget(0);

            distance = 40;
            yang     = MathEx.Degree2Radian(30);
            xang     = MathEx.Degree2Radian(45);

            sceneManager = new SceneManager();
            SceneRendererParameter sm = new SceneRendererParameter();

            sm.PostRenderer = new DefaultPostRenderer();
            sm.SceneManager = sceneManager;
            sm.UseShadow    = false;


            renderer = new SceneRenderer(renderSys, sm);

            renderer.RegisterCamera(camera);


            peff          = new SmokeEffect(renderSys);
            peff.Emitter  = new ParticleEmitter(1);
            peff.Modifier = new ParticleModifier();


            sceneManager.AddObjectToScene(peff);
        }
Example #3
0
        public void Load()
        {
            Size clSize = Program.Window.ClientSize;
            camera = new ChaseCamera(clSize.Width / (float)clSize.Height);
            camera.ChaseDirection = new Vector3(0, 0, 1);
            camera.ChasePosition = new Vector3(0, 0, 0);
            camera.DesiredPositionOffset = new Vector3(0, 0, 40);  
            camera.Mode = RenderMode.Final;
            camera.FarPlane = 1000;
            camera.NearPlane = 0.5f;
            camera.RenderTarget = renderSys.GetRenderTarget(0);

            distance = 40;
            yang = MathEx.Degree2Radian(30);
            xang = MathEx.Degree2Radian(45);

            sceneManager = new SceneManager();
            SceneRendererParameter sm = new SceneRendererParameter ();
            sm.PostRenderer = new DefaultPostRenderer();
            sm.SceneManager = sceneManager;
            sm.UseShadow = false;


            renderer = new SceneRenderer(renderSys, sm);

            renderer.RegisterCamera(camera);


            peff = new SmokeEffect(renderSys);
            peff.Emitter = new ParticleEmitter(1);
            peff.Modifier = new ParticleModifier();


            sceneManager.AddObjectToScene(peff);
        }
Example #4
0
        public void Load()
        {
            Size clSize = Program.Window.ClientSize;
            camera = new ChaseCamera(clSize.Width / (float)clSize.Height);
            camera.ChaseDirection = new Vector3(0, 0, 1);
            camera.ChasePosition = new Vector3(0, 0, 0);
            camera.DesiredPositionOffset = new Vector3(0, 0, 40);
            camera.Mode = RenderMode.Final;
            camera.FarPlane = 10000;
            camera.NearPlane = 10f;
            camera.RenderTarget = renderSys.GetRenderTarget(0);

            distance = 40;
            yang = MathEx.Degree2Radian(30);
            xang = MathEx.Degree2Radian(45);

            sceneManager = new SceneManager();
            SceneRendererParameter sm = new SceneRendererParameter();
            sm.PostRenderer = new DefaultPostRenderer();
            sm.SceneManager = sceneManager;
            sm.UseShadow = false;


            renderer = new SceneRenderer(renderSys, sm);

            renderer.RegisterCamera(camera);

            obj = new ModelWrapper();

            sceneManager.AddObjectToScene(obj);

            //ModelData mdlData = PathBuilder.BuildModel(renderSys, null, new Point[]
            //{
            //    new Point(0,0), new Point(2,1), new Point(4,4), new Point(5,4), new Point(6,5), new Point(6,7), new Point(9,9)
            //});

            //CurrentModel = new Model(new ResourceHandle<ModelData>(mdlData, true));
        }