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); }
public Task UpdateBodiesSpotsAsync(UpdatedTerrainTextures newHeightTexture) { throw new NotImplementedException(); }
public GroundShapeToken AddArea(GroundShapeInfo info, UpdatedTerrainTextures textures) { return(new GroundShapeToken(this, info, textures)); }
public GroundShapeToken(GRingSpotUpdater updater, GroundShapeInfo info, UpdatedTerrainTextures textures) { _updater = updater; _info = info; _textures = textures; }