コード例 #1
0
        public void SetArea(GroundShapeInfo info, UpdatedTerrainTextures textures)
        {
            var overlappingElements = FindOverlappingGroundShapes(info);

            foreach (var element in overlappingElements)
            {
                if (element.GroundShapeInfo.Equals(info))
                {
                    // this is the same area! Dont do anything
                    return;
                }
                else
                {
                    _designBodySpotUpdaterProxy.RemoveTerrainTextures(element.TerrainId);
                    _groundTree.Remove(element.GlobalSubpositionEnvelope, element);
                }
            }
            var terrainTextureId =
                _designBodySpotUpdaterProxy.UpdateBodiesSpots(textures);
            var newElementInTree = new GroundShapeInfoInTree()
            {
                GroundShapeInfo = info,
                TerrainId       = terrainTextureId,
            };

            _groundTree.Insert(newElementInTree.GlobalSubpositionEnvelope, newElementInTree);
        }
コード例 #2
0
 public Task UpdateBodiesSpotsAsync(UpdatedTerrainTextures newHeightTexture)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public GroundShapeToken AddArea(GroundShapeInfo info, UpdatedTerrainTextures textures)
 {
     return(new GroundShapeToken(this, info, textures));
 }
コード例 #4
0
 public GroundShapeToken(GRingSpotUpdater updater, GroundShapeInfo info, UpdatedTerrainTextures textures)
 {
     _updater  = updater;
     _info     = info;
     _textures = textures;
 }