Example #1
0
        public TerrainRenderer(MyGame game, Camera camera, ViewGridProvider viewGridProvider)
            : base(game)
        {
            m_chunkManager = ToDispose(new ChunkManager(this, camera, viewGridProvider));

            LoadContent();
        }
        public TerrainRenderer(MyGame game, Camera camera, ViewGridProvider viewGridProvider)
            : base(game)
        {
            m_chunkManager = ToDispose(new ChunkManager(this, camera, viewGridProvider));

            LoadContent();
        }
Example #3
0
        public SymbolRenderer(MyGame game, ViewGridProvider viewGridProvider)
            : base(game)
        {
            m_viewGridProvider = viewGridProvider;

            m_invalid = true;

            viewGridProvider.ViewGridCornerChanged +=
                (oldValue, newValue) => m_invalid   = true;

            game.EnvironmentChanged += OnEnvChanged;

            LoadContent();
        }
Example #4
0
        public SymbolRenderer(MyGame game, ViewGridProvider viewGridProvider)
            : base(game)
        {
            m_viewGridProvider = viewGridProvider;

            m_invalid = true;

            viewGridProvider.ViewGridCornerChanged +=
                (oldValue, newValue) => m_invalid = true;

            game.EnvironmentChanged += OnEnvChanged;

            LoadContent();
        }
Example #5
0
        public ChunkManager(TerrainRenderer scene, Camera camera, ViewGridProvider viewGridProvider)
        {
            m_scene = scene;
            m_camera = camera;
            m_viewGridProvider = viewGridProvider;

            // XXX
            m_game = (MyGame)scene.Game;
            m_game.EnvironmentChanged += Data_MapChanged;

            viewGridProvider.ViewGridCornerChanged += OnViewGridCornerChanged;

            m_cameraPos = m_camera.Position;
            m_cameraLook = m_camera.Look;
            m_cameraChunkPos = (m_cameraPos / Chunk.CHUNK_SIZE).ToFloorIntVector3();

            m_forceNearListUpdate = true;
            m_forceDrawListUpdate = true;
        }
Example #6
0
        public ChunkManager(TerrainRenderer scene, Camera camera, ViewGridProvider viewGridProvider)
        {
            m_scene            = scene;
            m_camera           = camera;
            m_viewGridProvider = viewGridProvider;

            // XXX
            m_game = (MyGame)scene.Game;
            m_game.EnvironmentChanged += Data_MapChanged;

            viewGridProvider.ViewGridCornerChanged += OnViewGridCornerChanged;

            m_cameraPos      = m_camera.Position;
            m_cameraLook     = m_camera.Look;
            m_cameraChunkPos = (m_cameraPos / Chunk.CHUNK_SIZE).ToFloorIntVector3();

            m_forceNearListUpdate = true;
            m_forceDrawListUpdate = true;
        }