Ejemplo n.º 1
0
        public DualContouringTestEnvironment()
        {
            cellSize = 0.5f;

            lines = new LineManager3DLines(TW.Graphics.Device);
            this.lines.SetMaxLines(1000000);

            PlaceableObjectGrid = new IntersectableCube();

            cameraLightSimulator = new CameraLightSimulator();


            surfaceRenderer = VoxelCustomRenderer.CreateDefault(TW.Graphics);
            TW.Graphics.AcquireRenderer().AddCustomGBufferRenderer(surfaceRenderer);
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            chunkSize       = BuilderConfiguration.ChunkNumVoxels;
            voxelSize       = BuilderConfiguration.VoxelSize;
            NumChunks       = BuilderConfiguration.NumChunks;
            surfaceRenderer = VoxelCustomRenderer.CreateDefault(TW.Graphics);
            TW.Graphics.AcquireRenderer().AddCustomGBufferRenderer(surfaceRenderer);

            initDefaultWorld();

            EngineFactory.CreateEngine().AddSimulator(processUserInput, "UserInput");
            interactiveTestingEnv = new InteractiveTestingEnvironment();
            interactiveTestingEnv.LoadIntoEngine(EngineFactory.CreateEngine());
            EngineFactory.CreateEngine().AddSimulator(new WorldRenderingSimulator());


            //TODO: add commands!

            //PlaceInWorld(createUnitBox(), new Point3(0, 20, 0));
        }