Exemple #1
0
        public void TestPhysicalLodRendererDummy()
        {
            float size = 400f;

            setupObjects(size, () => new RenderablePhysical());

            var lod = new LinebasedLodRenderer(new SimpleWorldOctree <RenderablePhysical>(new Vector3(size, 200, size), TW.Data.Objects.OfType <RenderablePhysical>()));

            TW.Data.Objects.OfType <Physical>().ForEach(delegate(Physical p) { p.Visible = false; });

            engine.AddSimulator(new BasicSimulator(lod.UpdateRendererState));

            engine.AddSimulator(new PhysicalSimulator());
            engine.AddSimulator(new WorldRenderingSimulator());

            engine.AddSimulator(new BasicSimulator(lod.RenderLines));
        }
Exemple #2
0
        public void TestPhysicalLodRendererOptimized()
        {
            float size = 1000f;

            setupObjects(size, () => new RenderablePhysical());

            var tree = new OptimizedWorldOctree <RenderablePhysical>(new Vector3(size, 200, size), 5);
            var lod  = new LinebasedLodRenderer(tree);

            TW.Data.Objects.OfType <RenderablePhysical>().ForEach(delegate(RenderablePhysical p) { tree.AddWorldObject(p); p.Visible = false; });

            engine.AddSimulator(new BasicSimulator(lod.UpdateRendererState));



            engine.AddSimulator(new PhysicalSimulator());
            engine.AddSimulator(new WorldRenderingSimulator());

            engine.AddSimulator(new BasicSimulator(lod.RenderLines));
        }