public void UpdateLod(int newLod)
        {
            int entityLod = _entityLodResolver.GetEntityLod(newLod);

            if (_entityLodLevel != entityLod)
            {
                _entityLodLevel = entityLod;
                _splat.Remove();
                _splat = _splatGenerator.GenerateSplat(_position, _entityLodLevel);
            }
        }
Exemple #2
0
        public LodEntitySplat UpdateLod(int newLod)
        {
            int entityLod = _entityLodResolver.GetEntityLod(newLod);

            if (_entityLodLevel != entityLod)
            {
                var newLevel = entityLod;
                var newSplat =
                    _splatUpdater.UpdateSplat(_splat, newLevel); //_splatGenerator.GenerateSplat(_position, newLevel);
                return(new LodEntitySplat(_position, _entityLodResolver, _splatGenerator, newLevel, newSplat,
                                          _splatUpdater));
            }
            else
            {
                _referencesCount = _referencesCount + 1;
                return(this);
            }
        }