// Copyright (C) Stichting Deltares 2017. All rights reserved. // // This file is part of the DAM Engine. // // The DAM Engine is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // // All names, logos, and references to "Deltares" are registered trademarks of // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. using Deltares.DamEngine.Data.Geometry; using Deltares.DamEngine.Data.Standard.Language; namespace Deltares.DamEngine.Data.Geotechnics { /// /// Represents a point on a surface line of a particular . /// /// public class CharacteristicPoint : GeometryPoint { private CharacteristicPointType characteristicPointType = CharacteristicPointType.None; private GeometryPoint geometryPoint; // Aggregation relationship /// /// Initializes a new instance of the class. /// /// public CharacteristicPoint() { //geometryPoint = new GeometryPoint(); } /// /// Initializes a new instance of the class. /// /// The containing characteristic point set. /// The geometry point. public CharacteristicPoint(CharacteristicPointSet set, GeometryPoint point) : this() { PointSet = set; SetGeometryPoint(point); } /// /// Gets or sets the characteristic type 'marker' of a geometry point on a surfaceline.. /// public CharacteristicPointType CharacteristicPointType { get { return characteristicPointType; } set { characteristicPointType = value; } } /// /// Gets or sets the geometry point. /// /// /// The geometry point. /// public GeometryPoint GeometryPoint { get { return geometryPoint; } set { SetGeometryPoint(value); } } /// /// Gets or sets the characteristic point set associated containing this point. /// public CharacteristicPointSet PointSet { get; set; } /// /// Gets or sets the X coordinate of GeometryPoint /// [Translation("L")] public override double X { get { return GeometryPoint.X; } set { if (GeometryPoint != null) { GeometryPoint.X = value; } } } /// /// Gets or sets the Z coordinate of GeometryPoint /// public override double Z { get { return GeometryPoint.Z; } set { if (GeometryPoint != null) { GeometryPoint.Z = value; } } } /// /// Returns a that represents this instance. /// /// /// A that represents this instance. /// public override string ToString() { return LocalizationManager.GetTranslatedText(GetType(), CharacteristicPointType.ToString()); } private void SetGeometryPoint(GeometryPoint point) { geometryPoint = point; } } }