Beispiel #1
0
        private void Update(FovData fovData)
        {
            var moveDelta = _nodeSplitController.CameraLastPosition.FlatDistance(fovData.CameraPosition);

            if (moveDelta > _configuration.MinimumTreeUpdateDelta)
            {
                _nodeSplitController.SetCameraPosition(fovData.CameraPosition);
                _visibilityResolver.SetFovDataOverride(null);
                _visibilityResolver.SetFovData(fovData);
                _rootNode.UpdateLod();
            }
        }
Beispiel #2
0
        CreateHeightmap_TODO_DELETE(
            HeightmapArray heightmapArray)     //input heightmap has 256x256 map, spans 5,7x5,7km p22.3m real life terrain
        {
            var tessalationRequirementTextureGenerator = new TessalationRequirementTextureGenerator();
            var tessalationReqTexture =
                tessalationRequirementTextureGenerator.GenerateTessalationRequirementTexture(heightmapArray, 64);

            var heightmapBundle = SavingFileManager.LoadHeightmapBundlesFromFiles("heightmapBundle", 4, 2048);

            var submapTextures = new Ring1SubmapTextures(heightmapBundle, tessalationReqTexture);

            _rootNode = CreateRootNode_TODO_DELETE(submapTextures);
            _rootNode.UpdateLod();
        }