예제 #1
0
        public StaticThreadedChunkManager(EngineConfiguration config, World world, int worldWidth, int worldHeight, int worldLength)
        {
            Contract.Assert(worldWidth > 0);
            Contract.Assert(worldHeight > 0);
            Contract.Assert(worldLength > 0);

            _config = config;

            _world = world;

            _worldWidth  = worldWidth;
            _worldHeight = worldHeight;
            _worldLength = worldLength;

            _chunks = new Chunk[worldWidth * worldHeight * worldLength];

            _buildQueue       = new Queue <Chunk>();
            _postProcessQueue = new Queue <Chunk>();

            _chunkSystem = null;
        }
예제 #2
0
        public ColoredChunkRenderer(EngineConfiguration config, ContentLibrary contentLibrary, GraphicsDevice device, CameraManager cameraManager, IChunkManager chunkManager)
        {
            _config = config;

            _device = device;

            _terrainColorEffect = contentLibrary.TerrainColorEffect;

            _camManager = cameraManager;
            _chunks     = chunkManager;

            _debugOptions = ChunkRendererDebugOptions.NONE;

            basicEffect = contentLibrary.BasicEffect;

            _debugRasterizerState = new RasterizerState()
            {
                CullMode = Microsoft.Xna.Framework.Graphics.CullMode.None, FillMode = Microsoft.Xna.Framework.Graphics.FillMode.WireFrame
            };
            _rasterizerState = new RasterizerState()
            {
                CullMode = Microsoft.Xna.Framework.Graphics.CullMode.CullCounterClockwiseFace
            };
        }
예제 #3
0
        public World(EngineConfiguration config, CameraManager cameraManager)
        {
            _config = config;

            _cameraManager = cameraManager;
        }