-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Geometry.Planar.Classes
Represents the abstract base class for a 2D boolean operation result.
public abstract class BooleanOperationResult2D : DiGi.Core.Classes.SerializableObject, DiGi.Geometry.Planar.Interfaces.IBooleanOperationResult2D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → BooleanOperationResult2D
Derived
↳ DifferenceResult2D
↳ IntersectionResult2D
↳ UnionResult2D
Implements IBooleanOperationResult2D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject
Initializes a new instance of the BooleanOperationResult2D class.
protected BooleanOperationResult2D();Initializes a new instance of the BooleanOperationResult2D class using another instance.
protected BooleanOperationResult2D(DiGi.Geometry.Planar.Classes.BooleanOperationResult2D? booleanOperationResult2D);booleanOperationResult2D BooleanOperationResult2D
The instance to copy from.
Initializes a new instance of the BooleanOperationResult2D class with the specified geometries.
protected BooleanOperationResult2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds);geometry2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
The geometries to store in the result.
Initializes a new instance of the BooleanOperationResult2D class from a prebuilt list of geometries.
protected BooleanOperationResult2D(System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds, bool clone);geometry2Ds System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
The list of geometries to store in the result.
clone System.Boolean
When true, each geometry is cloned defensively; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created geometries that are not shared.
Initializes a new instance of the BooleanOperationResult2D class using the specified System.Text.Json.Nodes.JsonObject.
protected BooleanOperationResult2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject used to initialize the instance.
Gets the type of the boolean operation.
public abstract DiGi.Geometry.Core.Enums.BooleanOpertaionType BooleanOpertaionType { get; }Implements BooleanOpertaionType
Gets the total number of DiGi.Geometry.Planar.Interfaces.IGeometry2D elements.
public int Count { get; }Implements Count
Gets the 2D geometry at the specified index.
public DiGi.Geometry.Planar.Interfaces.IGeometry2D? this[int index] { get; }index System.Int32
The zero-based index of the geometry to retrieve.
Implements this[int]
DiGi.Geometry.Planar.Interfaces.IGeometry2D
Determines whether there are any 2D geometries present.
public bool Any();Implements Any()
System.Boolean
true if any geometries are present; otherwise, false.
Determines whether the collection contains any object of the specified type T.
public bool Contains<T>()
where T : DiGi.Geometry.Planar.Interfaces.IGeometry2D;T
The type of geometry to search for.
Implements Contains<T>()
System.Boolean
true if an object of type T is present; otherwise, false.
Retrieves a list of 2D geometries of the specified type T.
public System.Collections.Generic.List<T>? GetGeometry2Ds<T>()
where T : DiGi.Geometry.Planar.Interfaces.IGeometry2D;T
The type of geometry to retrieve, which must implement the DiGi.Geometry.Planar.Interfaces.IGeometry2D interface.
Implements GetGeometry2Ds<T>()
System.Collections.Generic.List<T>
A list of matching geometries, or null if no geometries are present.
Represents an axis-aligned bounding box in 2D space.
public class BoundingBox2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Core.Interfaces.IBoundingBox<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.IBoundingBox, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → BoundingBox2D
Implements DiGi.Geometry.Core.Interfaces.IBoundingBox<Point2D>, DiGi.Geometry.Core.Interfaces.IBoundingBox, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the BoundingBox2D class defined by X and Y ranges.
public BoundingBox2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y);x DiGi.Core.Classes.Range<System.Double>
The range of the X axis.
y DiGi.Core.Classes.Range<System.Double>
The range of the Y axis.
Initializes a new instance of the BoundingBox2D class by cloning an existing bounding box.
public BoundingBox2D(DiGi.Geometry.Planar.Classes.BoundingBox2D boundingBox2D);boundingBox2D BoundingBox2D
The source bounding box to clone.
Initializes a new instance of the BoundingBox2D class defined by two points as opposite corners.
public BoundingBox2D(DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2);point2D_1 Point2D
The first corner point.
point2D_2 Point2D
The second corner point.
Initializes a new instance of the BoundingBox2D class defined by its origin and size.
public BoundingBox2D(double x, double y, double width, double height);The X coordinate of the origin.
The Y coordinate of the origin.
width System.Double
The width of the bounding box.
height System.Double
The height of the bounding box.
Initializes a new instance of the BoundingBox2D class directly from corner coordinates, without intermediate allocations.
internal BoundingBox2D(double x_1, double y_1, double x_2, double y_2, bool sorted);x_1 System.Double
The X coordinate of the first corner.
y_1 System.Double
The Y coordinate of the first corner.
x_2 System.Double
The X coordinate of the second corner.
y_2 System.Double
The Y coordinate of the second corner.
sorted System.Boolean
When true, the caller guarantees the first corner is the minimum and the second the maximum; when false, the coordinates are normalized.
Initializes a new instance of the BoundingBox2D class that encompasses all given bounding boxes.
public BoundingBox2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.BoundingBox2D?>? boundingBox2Ds);boundingBox2Ds System.Collections.Generic.IEnumerable<BoundingBox2D>
The collection of bounding boxes to encompass.
Initializes a new instance of the BoundingBox2D class that encompasses all given points.
public BoundingBox2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The collection of points to encompass.
Initializes a new instance of the BoundingBox2D class that encompasses all given points with an added offset.
public BoundingBox2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, double offset);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The collection of points to encompass.
offset System.Double
The distance to expand the bounding box in all directions.
Initializes a new instance of the BoundingBox2D class from a JSON object.
public BoundingBox2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing bounding box data.
Gets the bottom-left corner of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D? BottomLeft { get; }Gets the bottom-right corner of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D? BottomRight { get; }Gets the height of the bounding box.
public double Height { get; }Gets or sets the maximum corner (top-right) of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D Max { get; set; }Implements Max
Gets the minimum corner (bottom-left) of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D Min { get; set; }Implements Min
Gets the top-left corner of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D? TopLeft { get; }Gets the top-right corner of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D? TopRight { get; }Gets the width of the bounding box.
public double Width { get; }Adds another bounding box to this one, expanding it to encompass the new area.
public bool Add(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D);boundingBox2D BoundingBox2D
The bounding box to add.
System.Boolean
True if the bounding box was successfully added.
Adds a point to this bounding box, expanding it to encompass the point.
public bool Add(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The point to add.
System.Boolean
True if the point was successfully added.
Creates a clone of the current bounding box.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the bounding box.
Finds the point on the bounding box closest to the given point.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Point2D
The closest point on the bounding box boundary.
Calculates the distance from a point to the bounding box boundary.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
System.Double
The shortest distance to the boundary.
Calculates the area of the bounding box.
public double GetArea();System.Double
The area of the bounding box.
Gets the centroid of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D? GetCentroid();Point2D
The center point of the bounding box.
Gets the diagonals of the bounding box.
public DiGi.Geometry.Planar.Classes.Segment2D[]? GetDiagonals();Segment2D[]
An array containing the two diagonal segments.
Calculates the perimeter length of the bounding box.
public double GetLength();System.Double
The total length of the boundary.
Gets the point corresponding to a specific corner of the bounding box.
public DiGi.Geometry.Planar.Classes.Point2D? GetPoint(DiGi.Geometry.Core.Enums.Corner corner);corner Corner
The corner to retrieve.
Point2D
The point at the specified corner.
Gets the four corner points of the bounding box.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? GetPoints();System.Collections.Generic.List<Point2D>
A list containing the bottom-left, top-left, top-right, and bottom-right corners.
Gets the four segments forming the boundary of the bounding box.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();System.Collections.Generic.List<Segment2D>
A list of segments that define the perimeter.
Checks if another bounding box is within or intersects this bounding box.
public bool InRange(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, double tolerance=1E-06);boundingBox2D BoundingBox2D
The bounding box to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the bounding box is on or inside this bounding box.
Checks if a line is within or intersects the bounding box.
public bool InRange(DiGi.Geometry.Planar.Classes.Line2D? line2D, double tolerance=1E-06);line2D Line2D
The line to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the line is in range of the bounding box.
Checks if a point is within or on the boundary of this bounding box.
public bool InRange(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on or inside the bounding box.
Checks if a segment is within or intersects the bounding box.
public bool InRange(DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);segment2D Segment2D
The segment to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the segment is in range of the bounding box.
Checks if a segmentable geometry is within or intersects the bounding box.
public bool InRange(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The geometry to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if any part of the geometry is in range of the bounding box.
Legacy method to check if a segment is within or intersects the bounding box.
public bool InRange_Old(DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);segment2D Segment2D
The segment to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the segment is in range of the bounding box.
Checks if boundingBox2D is inside this BoundingBox2D
public bool Inside(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, double tolerance=1E-06);boundingBox2D BoundingBox2D
BoundingBox2D
tolerance System.Double
Tolerance
System.Boolean
True if given boundingBox2D is inside this BoundingBox2D with given tolerance
Checks if a point is strictly inside the bounding box boundaries.
public bool Inside(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is strictly inside.
Checks if a segmentable geometry is strictly inside the bounding box boundaries.
public bool Inside(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The geometry to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if all points of the geometry are strictly inside.
Checks if a collection of points are all strictly inside the bounding box boundaries.
public bool Inside(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, double tolerance=1E-06);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The collection of points to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if all points are strictly inside.
Moves the bounding box by the specified vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Offsets the bounding box boundaries by a specified distance in all directions.
public void Offset(double value);value System.Double
The offset value.
Checks if a point lies on the boundary of the bounding box.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the boundary.
Transforms the bounding box using the specified transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Implicitly converts a BoundingBox2D to a Polygon2D.
public static DiGi.Geometry.Planar.Classes.Polygon2D? implicit operator DiGi.Geometry.Planar.Classes.Polygon2D?(DiGi.Geometry.Planar.Classes.BoundingBox2D boundingBox2D);boundingBox2D BoundingBox2D
The bounding box to convert.
Polygon2D
A Polygon2D representation of the bounding box.
Represents a 2D circle defined by its center and radius.
public class Circle2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.IEllipse2D, DiGi.Geometry.Planar.Interfaces.IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Circle2D
Implements IEllipse2D, IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable
Initializes a new instance of the Circle2D class.
public Circle2D();Initializes a new instance of the Circle2D class by cloning an existing circle.
public Circle2D(DiGi.Geometry.Planar.Classes.Circle2D? circle2D);circle2D Circle2D
The source circle to clone.
Initializes a new instance of the Circle2D class with a specified center and radius.
public Circle2D(DiGi.Geometry.Planar.Classes.Point2D? center, double radius);center Point2D
The center point of the circle.
radius System.Double
The radius of the circle.
Initializes a new instance of the Circle2D class from a JSON object.
public Circle2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing circle data.
Gets or sets the center point of the circle.
public DiGi.Geometry.Planar.Classes.Point2D? Center { get; set; }Implements Center
Gets or sets the diameter of the circle.
public double Diameter { get; set; }Gets the circumference (length) of the circle.
public double Length { get; }Gets or sets the radius of the circle.
public double Radius { get; set; }Creates a clone of the current circle.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the circle.
Calculates the area of the circle.
public double GetArea();Implements GetArea()
System.Double
The area of the circle.
Gets the axis-aligned bounding box of the circle.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
The bounding box encompassing the circle.
Gets a point guaranteed to be inside the circle.
public DiGi.Geometry.Planar.Classes.Point2D? GetInternalPoint(double tolerance=1E-06);tolerance System.Double
The distance tolerance.
Implements GetInternalPoint(double)
Point2D
An internal point of the circle.
Gets the perimeter (circumference) of the circle.
public double GetPerimeter();Implements GetPerimeter()
System.Double
The length of the boundary.
Checks if an axis-aligned bounding box is within or intersects the circle.
public bool InRange(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, double tolerance=1E-06);boundingBox2D BoundingBox2D
The bounding box to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the bounding box is in range of the circle.
Checks if a point is within or on the boundary of the circle.
public bool InRange(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements InRange(Point2D, double)
System.Boolean
True if the point is in range of the circle.
Checks if a segmentable geometry is within or intersects the circle.
public bool InRange(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The geometry to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if any part of the geometry is in range of the circle.
Checks if a point is strictly inside the circle boundaries.
public bool Inside(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements Inside(Point2D, double)
System.Boolean
True if the point is strictly inside.
Checks if a segmentable geometry is strictly inside the circle boundaries.
public bool Inside(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The geometry to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if all points of the geometry are strictly inside.
Moves the circle by the specified vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Checks if a point lies on the boundary of the circle.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the boundary.
Transforms the circle using the specified transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
internal class ConvexHullComparer : System.Collections.Generic.IComparer<DiGi.Geometry.Planar.Classes.Point2D>Inheritance System.Object → ConvexHullComparer
Implements System.Collections.Generic.IComparer<Point2D>
Compares two points for the purpose of calculating a convex hull.
public int Compare(DiGi.Geometry.Planar.Classes.Point2D point2D_1, DiGi.Geometry.Planar.Classes.Point2D point2D_2);point2D_1 Point2D
The first point to compare.
point2D_2 Point2D
The second point to compare.
System.Int32
A value indicating the relative order of the two points.
Base class for 2D coordinates providing basic transformation and movement functionality.
public abstract class Coordinate2D : DiGi.Geometry.Core.Classes.Coordinate, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Coordinate → Coordinate2D
Implements DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable
Initializes a new instance of the Coordinate2D class.
public Coordinate2D();Initializes a new instance of the Coordinate2D class by cloning an existing coordinate.
public Coordinate2D(DiGi.Geometry.Planar.Classes.Coordinate2D? coordinate2D);coordinate2D Coordinate2D
The source coordinate to clone.
Initializes a new instance of the Coordinate2D class with specified X and Y coordinates.
public Coordinate2D(double x, double y);The X coordinate.
The Y coordinate.
Initializes a new instance of the Coordinate2D class from an array of values.
public Coordinate2D(double[]? values);values System.Double[]
The coordinate values.
Initializes a new instance of the Coordinate2D class with the specified internal values array length.
protected Coordinate2D(int length);length System.Int32
The length of the values array.
Initializes a new instance of the Coordinate2D class from a JSON object.
public Coordinate2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing coordinate data.
Gets or sets the X coordinate.
public double X { get; set; }Gets or sets the Y coordinate.
public double Y { get; set; }Moves the coordinate by the specified vector.
public bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Transforms the coordinate using the specified transformation.
public bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Represents a two-dimensional coordinate system defined by an origin Point2D and basis vectors Vector2D.
public class CoordinateSystem2D : DiGi.Core.Classes.SerializableObject, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → CoordinateSystem2D
Implements DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable
Initializes a new instance of the CoordinateSystem2D class with default origin and world axes.
public CoordinateSystem2D();Initializes a new instance of the CoordinateSystem2D class by cloning an existing coordinate system.
public CoordinateSystem2D(DiGi.Geometry.Planar.Classes.CoordinateSystem2D? coordinateSystem2D);coordinateSystem2D CoordinateSystem2D
The source coordinate system to clone.
Initializes a new instance of the CoordinateSystem2D class with a specified origin and world axes.
public CoordinateSystem2D(DiGi.Geometry.Planar.Classes.Point2D? origin);origin Point2D
The origin point of the coordinate system.
Initializes a new instance of the CoordinateSystem2D class from a JSON object.
public CoordinateSystem2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing coordinate system data.
Gets the X-axis vector of the coordinate system.
public DiGi.Geometry.Planar.Classes.Vector2D? AxisX { get; }Gets the Y-axis vector of the coordinate system.
public DiGi.Geometry.Planar.Classes.Vector2D? AxisY { get; }Gets the origin point of the coordinate system.
public DiGi.Geometry.Planar.Classes.Point2D? Origin { get; }Creates a clone of the current coordinate system.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the coordinate system.
Gets the vector corresponding to the specified axis.
public DiGi.Geometry.Planar.Classes.Vector2D? GetAxis(DiGi.Geometry.Planar.Enums.PlanarAxis axis);axis PlanarAxis
The axis to retrieve.
Vector2D
The vector of the requested axis.
Moves the coordinate system origin by the specified vector.
public bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Transforms the coordinate system using the specified transformation.
public bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Represents the result of a 2D difference operation.
public class DifferenceResult2D : DiGi.Geometry.Planar.Classes.BooleanOperationResult2D, DiGi.Geometry.Planar.Interfaces.IDifferenceResult2D, DiGi.Geometry.Planar.Interfaces.IBooleanOperationResult2D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → BooleanOperationResult2D → DifferenceResult2D
Implements IDifferenceResult2D, IBooleanOperationResult2D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject
Initializes a new instance of the DifferenceResult2D class.
public DifferenceResult2D();Initializes a new instance of the DifferenceResult2D class using another DifferenceResult2D instance.
public DifferenceResult2D(DiGi.Geometry.Planar.Classes.DifferenceResult2D? differenceResult2D);differenceResult2D DifferenceResult2D
The DifferenceResult2D instance to copy from.
Initializes a new instance of the DifferenceResult2D class with the specified DiGi.Geometry.Planar.Interfaces.IGeometry2D.
public DifferenceResult2D(DiGi.Geometry.Planar.Interfaces.IGeometry2D? geometry2D);geometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D
The DiGi.Geometry.Planar.Interfaces.IGeometry2D to initialize the result with. This value can be null.
Initializes a new instance of the DifferenceResult2D class.
public DifferenceResult2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds);geometry2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
An optional collection of DiGi.Geometry.Planar.Interfaces.IGeometry2D objects to be cloned and stored in the result.
Initializes a new instance of the DifferenceResult2D class from a prebuilt list of geometries.
internal DifferenceResult2D(System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds, bool clone);geometry2Ds System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
The list of geometries resulting from the difference.
clone System.Boolean
When true, each geometry is cloned defensively; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created geometries that are not shared.
Initializes a new instance of the DifferenceResult2D class using the specified System.Text.Json.Nodes.JsonObject.
public DifferenceResult2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject used to initialize the instance.
Gets the type of the boolean operation, which is Difference.
public override DiGi.Geometry.Core.Enums.BooleanOpertaionType BooleanOpertaionType { get; }Implements BooleanOpertaionType
Creates a copy of the current DifferenceResult2D instance.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object.
Provides functionality to update a 2D geometry using the Douglas-Peucker simplification algorithm.
public class DouglasPeuckerUpdater : DiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>Inheritance System.Object → DiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D> → DouglasPeuckerUpdater
Initializes a new instance of the DouglasPeuckerUpdater class.
public DouglasPeuckerUpdater();Initializes a new instance of the DouglasPeuckerUpdater class with a specified tolerance.
public DouglasPeuckerUpdater(double tolerance);tolerance System.Double
The System.Double value representing the distance tolerance used for simplifying geometries.
Updates the current value by simplifying its underlying geometry using the Douglas-Peucker simplification algorithm.
public override bool Update();Implements Update()
System.Boolean
A System.Boolean indicating whether the update was successful. Returns false if the value is null or cannot be simplified; otherwise, returns true.
Represents a 2D ellipse defined by its center, semi-axes lengths, and the direction of the major axis.
public class Ellipse2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.IEllipse2D, DiGi.Geometry.Planar.Interfaces.IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Ellipse2D
Implements IEllipse2D, IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable
Initializes a new instance of the Ellipse2D class by cloning an existing ellipse.
public Ellipse2D(DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D);ellipse2D Ellipse2D
The source ellipse to clone.
Initializes a new instance of the Ellipse2D class with center and semi-axes lengths.
public Ellipse2D(DiGi.Geometry.Planar.Classes.Point2D? center, double a, double b);center Point2D
The center point of the ellipse.
The length of the semi-major axis.
The length of the semi-minor axis.
Initializes a new instance of the Ellipse2D class with center, semi-axes lengths and major axis direction.
public Ellipse2D(DiGi.Geometry.Planar.Classes.Point2D? center, double a, double b, DiGi.Geometry.Planar.Classes.Vector2D? directionA);center Point2D
The center point of the ellipse.
The length of the semi-major axis.
The length of the semi-minor axis.
directionA Vector2D
The direction vector of the major axis.
Initializes a new instance of the Ellipse2D class from a JSON object.
public Ellipse2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing ellipse data.
Gets or sets the length of the semi-major axis.
public double A { get; set; }Gets or sets the length of the semi-minor axis.
public double B { get; set; }Gets the linear eccentricity of the ellipse.
public double C { get; }Gets or sets the center point of the ellipse.
public DiGi.Geometry.Planar.Classes.Point2D? Center { get; set; }Implements Center
Gets or sets the direction vector of the major axis.
public DiGi.Geometry.Planar.Classes.Vector2D? DirectionA { get; set; }Gets the direction vector of the minor axis.
public DiGi.Geometry.Planar.Classes.Vector2D? DirectionB { get; }Creates a clone of the current ellipse.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the ellipse.
Calculates the shortest distance from a point to the ellipse boundary.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
System.Double
The minimum distance to the boundary.
Determines whether the specified object is equal to the current ellipse.
public override bool Equals(object? obj);obj System.Object
The object to compare with the current ellipse.
System.Boolean
True if the objects are equal; otherwise, false.
Calculates the area of the ellipse.
public double GetArea();Implements GetArea()
System.Double
The area of the ellipse.
Gets the axis-aligned bounding box of the ellipse.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
The bounding box encompassing the ellipse.
Calculates the distance between the two foci of the ellipse.
public double GetFocalLength();System.Double
The distance between the foci (2C), or NaN if it cannot be determined.
Gets the focal points of the ellipse.
public DiGi.Geometry.Planar.Classes.Point2D[]? GetFocalPoints();Point2D[]
An array containing the two foci.
Gets the hash code for this ellipse.
public override int GetHashCode();System.Int32
A 32-bit signed integer hash code.
Gets a point guaranteed to be inside the ellipse.
public DiGi.Geometry.Planar.Classes.Point2D? GetInternalPoint(double tolerance=1E-06);tolerance System.Double
The distance tolerance.
Implements GetInternalPoint(double)
Point2D
An internal point of the ellipse.
Calculates the approximate perimeter of the ellipse using Ramanujan's formula.
public double GetPerimeter();Implements GetPerimeter()
System.Double
The circumference of the ellipse.
Gets the point on the ellipse boundary in a given direction from the center.
public DiGi.Geometry.Planar.Classes.Point2D? GetPoint(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The direction vector.
Point2D
The corresponding point on the ellipse boundary.
Checks if a point is within or on the boundary of the ellipse.
public bool InRange(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements InRange(Point2D, double)
System.Boolean
True if the point is in range of the ellipse.
Checks if a point is strictly inside the ellipse boundaries.
public bool Inside(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements Inside(Point2D, double)
System.Boolean
True if the point is strictly inside.
Inverts the direction of the major axis.
public void Inverse();Moves the ellipse by the specified vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Checks if a point lies on the boundary of the ellipse.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the boundary.
Projects a point onto the ellipse boundary along the ray from the centre through the point (a fast radial approximation, not the closest boundary point). Use the tolerance overload for the true nearest point.
public DiGi.Geometry.Planar.Classes.Point2D? Project(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Point2D
The boundary point along the centre-to-point direction.
Projects a point onto the ellipse boundary, returning the closest boundary point via Newton iteration on the parametric angle.
public DiGi.Geometry.Planar.Classes.Point2D? Project(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance);point2D Point2D
The target point.
tolerance System.Double
The angular convergence tolerance, in radians.
Point2D
The closest point on the ellipse boundary, or null if it cannot be determined.
Transforms the ellipse using the specified transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Determines whether two ellipses are equal.
public static bool operator ==(DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D_1, DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D_2);ellipse2D_1 Ellipse2D
The first ellipse.
ellipse2D_2 Ellipse2D
The second ellipse.
System.Boolean
True if the ellipses are equal; otherwise, false.
Converts a Circle2D to an Ellipse2D.
public static DiGi.Geometry.Planar.Classes.Ellipse2D? explicit operator DiGi.Geometry.Planar.Classes.Ellipse2D?(DiGi.Geometry.Planar.Classes.Circle2D? circle2D);circle2D Circle2D
The source circle.
Ellipse2D
An ellipse equivalent to the circle.
Determines whether two ellipses are not equal.
public static bool operator !=(DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D_1, DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D_2);ellipse2D_1 Ellipse2D
The first ellipse.
ellipse2D_2 Ellipse2D
The second ellipse.
System.Boolean
True if the ellipses are not equal; otherwise, false.
Represents a base class for all two-dimensional geometric objects.
public abstract class Geometry2D : DiGi.Core.Classes.SerializableObject, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D
Derived
↳ BoundingBox2D
↳ Circle2D
↳ Ellipse2D
↳ Grid2D
↳ Line2D
↳ PolygonalFace2D
↳ Ray2D
↳ Rectangle2D
↳ Segment2D
↳ Segmentable2D
Implements DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable
Initializes a new instance of the Geometry2D class.
public Geometry2D();Initializes a new instance of the Geometry2D class by cloning an existing geometry.
public Geometry2D(DiGi.Geometry.Planar.Classes.Geometry2D? geometry2D);geometry2D Geometry2D
The source geometry to clone.
Initializes a new instance of the Geometry2D class from a JSON object.
public Geometry2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing geometry data.
Moves the geometry by the specified vector.
public abstract bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Transforms the geometry using the specified transformation.
public abstract bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Represents a collection of two-dimensional geometry objects that implement the DiGi.Geometry.Planar.Interfaces.ICollectable2D interface.
public class GeometryCollection2D : DiGi.Geometry.Core.Classes.GeometryCollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, DiGi.Geometry.Planar.Interfaces.IGeometryCollection2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Core.Interfaces.IGeometryCollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, DiGi.Geometry.Core.Interfaces.IGeometryCollection, System.Collections.Generic.ICollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, System.Collections.IEnumerableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.SerializableObjectCollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D> → DiGi.Geometry.Core.Classes.GeometryCollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D> → GeometryCollection2D
Implements DiGi.Geometry.Planar.Interfaces.IGeometryCollection2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Core.Interfaces.IGeometryCollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, DiGi.Geometry.Core.Interfaces.IGeometryCollection, System.Collections.Generic.ICollection<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ICollectable2D>, System.Collections.IEnumerable
Initializes a new instance of the GeometryCollection2D class.
public GeometryCollection2D();Initializes a new instance of the GeometryCollection2D class from a collection of geometries.
public GeometryCollection2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ICollectable2D> collectable2Ds);collectable2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.ICollectable2D>
The collection of geometries.
Initializes a new instance of the GeometryCollection2D class from a JSON object.
public GeometryCollection2D(System.Text.Json.Nodes.JsonObject jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing collection data.
Moves all geometries in the collection by the specified vector.
public bool Move(DiGi.Geometry.Planar.Classes.Vector2D vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Transforms all geometries in the collection using the specified transformation.
public bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Represents a two-dimensional grid geometry defined by its total width, total height, and the number of cells along each axis.
public class Grid2D : DiGi.Geometry.Planar.Classes.Geometry2DInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Grid2D
Initializes a new instance of the Grid2D class by cloning an existing grid.
public Grid2D(DiGi.Geometry.Planar.Classes.Grid2D grid2D);grid2D Grid2D
The source grid to clone.
Initializes a new instance of the Grid2D class.
public Grid2D(DiGi.Geometry.Planar.Classes.Point2D? origin, double width, double height, DiGi.Geometry.Planar.Classes.Vector2D? heightDirection, int widthCount, int heightCount);origin Point2D
The origin point of the grid.
width System.Double
The total width of the grid.
height System.Double
The total height of the grid.
heightDirection Vector2D
The direction of the height axis.
widthCount System.Int32
The number of cells in the width direction.
heightCount System.Int32
The number of cells in the height direction.
Initializes a new instance of the Grid2D class.
public Grid2D(DiGi.Geometry.Planar.Classes.Rectangle2D? rectangle2D, int widthCount, int heightCount);rectangle2D Rectangle2D
The bounding rectangle of the grid.
widthCount System.Int32
The number of cells in the width direction.
heightCount System.Int32
The number of cells in the height direction.
Initializes a new instance of the Grid2D class from a JSON object.
public Grid2D(System.Text.Json.Nodes.JsonObject jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing grid data.
Gets the number of cells in the height direction.
public int HeightCount { get; }Gets the height of a single cell in the grid.
public double HeightFactor { get; }Gets the bounding rectangle of the grid.
public DiGi.Geometry.Planar.Classes.Rectangle2D? Rectangle2D { get; }Gets the rectangle at the specified grid indices.
public DiGi.Geometry.Planar.Classes.Rectangle2D? this[int index_width, int index_height] { get; }index_width System.Int32
The index along the width axis.
index_height System.Int32
The index along the height axis.
Gets the number of cells in the width direction.
public int WidthCount { get; }Gets the width of a single cell in the grid.
public double WidthFactor { get; }Gets the rectangle at the specified grid indices.
public DiGi.Geometry.Planar.Classes.Rectangle2D? GetRectangle(int index_width, int index_height);index_width System.Int32
The index along the width axis.
index_height System.Int32
The index along the height axis.
Rectangle2D
The Rectangle2D at the specified position, or null if it cannot be determined.
Gets all rectangles in the grid.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Rectangle2D>? GetRectangles();System.Collections.Generic.List<Rectangle2D>
A list of all cell rectangles, or null if the grid is invalid.
Moves the grid by the specified vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The movement vector.
System.Boolean
True if the move was successful; otherwise, false.
Transforms the grid using the specified transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Represents the result of a 2D intersection operation.
public class IntersectionResult2D : DiGi.Geometry.Planar.Classes.BooleanOperationResult2D, DiGi.Geometry.Planar.Interfaces.IIntersectionResult2D, DiGi.Geometry.Core.Interfaces.IIntersectionResult, DiGi.Geometry.Core.Interfaces.IBooleanOperationResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → BooleanOperationResult2D → IntersectionResult2D
Implements IIntersectionResult2D, DiGi.Geometry.Core.Interfaces.IIntersectionResult, IBooleanOperationResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject
Initializes a new instance of the IntersectionResult2D class.
public IntersectionResult2D();Initializes a new instance of the IntersectionResult2D class using another IntersectionResult2D instance.
public IntersectionResult2D(DiGi.Geometry.Planar.Classes.IntersectionResult2D? intersectionResult2D);intersectionResult2D IntersectionResult2D
The IntersectionResult2D instance to copy from.
Initializes a new instance of the IntersectionResult2D class with the specified DiGi.Geometry.Planar.Interfaces.IGeometry2D.
public IntersectionResult2D(DiGi.Geometry.Planar.Interfaces.IGeometry2D? geometry2D);geometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D
The DiGi.Geometry.Planar.Interfaces.IGeometry2D to initialize the result with. This value can be null.
Initializes a new instance of the IntersectionResult2D class.
public IntersectionResult2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds);geometry2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
An optional collection of DiGi.Geometry.Planar.Interfaces.IGeometry2D objects to be cloned and stored in the result.
Initializes a new instance of the IntersectionResult2D class from a prebuilt list of geometries.
internal IntersectionResult2D(System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds, bool clone);geometry2Ds System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
The list of geometries resulting from the intersection.
clone System.Boolean
When true, each geometry is cloned defensively; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created geometries that are not shared.
Initializes a new instance of the IntersectionResult2D class using the specified System.Text.Json.Nodes.JsonObject.
public IntersectionResult2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject used to initialize the instance.
Gets the type of the boolean operation, which is Intersection.
public override DiGi.Geometry.Core.Enums.BooleanOpertaionType BooleanOpertaionType { get; }Implements BooleanOpertaionType
Creates a copy of the current IntersectionResult2D instance.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object.
Represents an infinite line in 2D space defined by an origin point and a direction vector.
public class Line2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.ILinear2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.IGeometry2DInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Line2D
Implements ILinear2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.IGeometry2D
Initializes a new instance of the Line2D class by cloning an existing line.
public Line2D(DiGi.Geometry.Planar.Classes.Line2D? line2D);line2D Line2D
The source line to clone.
Initializes a new instance of the Line2D class with a specified origin and direction.
public Line2D(DiGi.Geometry.Planar.Classes.Point2D? origin, DiGi.Geometry.Planar.Classes.Vector2D? direction);origin Point2D
The origin point of the line.
direction Vector2D
The direction vector of the line.
Gets or sets the unit direction vector of the line.
public DiGi.Geometry.Planar.Classes.Vector2D? Direction { get; set; }Implements Direction
Gets or sets the origin point of the line.
public DiGi.Geometry.Planar.Classes.Point2D? Origin { get; set; }Creates a clone of the current line.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the line.
Finds the point on the line closest to the given point.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Implements ClosestPoint(Point2D)
Point2D
The projected point on the line.
Checks if another linear geometry is collinear with this line.
public bool Collinear(DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D, double tolerance=1E-06);linear2D ILinear2D
The linear geometry to check.
tolerance System.Double
The distance tolerance for the check.
Implements Collinear(ILinear2D, double)
System.Boolean
True if they are collinear; otherwise, false.
Calculates the shortest distance from a point to the line.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Implements Distance(Point2D)
System.Double
The perpendicular distance to the line.
Determines whether the specified object is equal to the current line.
public override bool Equals(object? obj);obj System.Object
The object to compare with the current line.
System.Boolean
True if the objects are equal; otherwise, false.
Gets the hash code for this line.
public override int GetHashCode();System.Int32
A 32-bit signed integer hash code.
Calculates the intersection point of two lines.
public DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Line2D? line2D, double tolerance=1E-06);line2D Line2D
The other line to intersect with.
tolerance System.Double
The distance tolerance for the check.
Point2D
The intersection point, or null if they are parallel or collinear.
Calculates the intersection point of a line and a segment.
public DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);segment2D Segment2D
The segment to intersect with.
tolerance System.Double
The distance tolerance for the check.
Point2D
The intersection point, or null if no intersection exists within the segment boundaries.
Reverses the direction of the line.
public bool Inverse();System.Boolean
True if the direction was successfully reversed.
Moves the line by translating its origin point.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Checks if a point lies on the line within the specified tolerance.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements On(Point2D, double)
System.Boolean
True if the point is on the line; otherwise, false.
Checks if the point given by its coordinates lies on the line within the specified tolerance, without allocating.
internal bool On(double x, double y, double tolerance);The X coordinate of the point to check.
The Y coordinate of the point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the line; otherwise, false.
Projects a point onto the line.
public DiGi.Geometry.Planar.Classes.Point2D? Project(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Implements Project(Point2D)
Point2D
The projected point on the line.
Transforms the line using the specified transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Gets the origin and direction coordinates of the line without allocating intermediate objects.
internal bool TryGetCoordinates(out double x_Origin, out double y_Origin, out double x_Direction, out double y_Direction);x_Origin System.Double
When this method returns true, the X coordinate of the origin point.
y_Origin System.Double
When this method returns true, the Y coordinate of the origin point.
x_Direction System.Double
When this method returns true, the X component of the direction vector.
y_Direction System.Double
When this method returns true, the Y component of the direction vector.
System.Boolean
True if the line has a valid origin and direction; otherwise, false.
Determines whether two lines are equal.
public static bool operator ==(DiGi.Geometry.Planar.Classes.Line2D? line2D_1, DiGi.Geometry.Planar.Classes.Line2D? line2D_2);line2D_1 Line2D
The first line.
line2D_2 Line2D
The second line.
System.Boolean
True if the lines are equal; otherwise, false.
Explicitly converts a segment to a line that extends infinitely in both directions along the segment's axis.
public static DiGi.Geometry.Planar.Classes.Line2D? explicit operator DiGi.Geometry.Planar.Classes.Line2D?(DiGi.Geometry.Planar.Classes.Segment2D? segment2D);segment2D Segment2D
The source segment.
Line2D
A Line2D representation of the infinite line containing the segment.
Determines whether two lines are not equal.
public static bool operator !=(DiGi.Geometry.Planar.Classes.Line2D? line2D_1, DiGi.Geometry.Planar.Classes.Line2D? line2D_2);line2D_1 Line2D
The first line.
line2D_2 Line2D
The second line.
System.Boolean
True if the lines are not equal; otherwise, false.
Represents a two-dimensional mesh composed of Point2D elements, implementing 2D geometry, bounding, and collection interfaces.
public class Mesh2D : DiGi.Geometry.Core.Classes.Mesh<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectableInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Geometry.Core.Classes.Mesh<Point2D> → Mesh2D
Implements DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable
Initializes a new instance of the Mesh2D class by cloning an existing mesh.
public Mesh2D(DiGi.Geometry.Planar.Classes.Mesh2D? mesh2D);mesh2D Mesh2D
The source mesh to clone.
Initializes a new instance of the Mesh2D class with specified points and indices.
public Mesh2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? points, System.Collections.Generic.IEnumerable<int[]>? indexes);points System.Collections.Generic.IEnumerable<Point2D>
The collection of vertices.
indexes System.Collections.Generic.IEnumerable<System.Int32[]>
The index arrays defining triangles.
Initializes a new instance of the Mesh2D class from prebuilt lists.
internal Mesh2D(System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, System.Collections.Generic.List<int[]>? indexes, bool clone);point2Ds System.Collections.Generic.List<Point2D>
The System.Collections.Generic.List<> containing the vertices of the mesh.
indexes System.Collections.Generic.List<System.Int32[]>
The System.Collections.Generic.List<> of int[] defining the triangle indices of the mesh.
clone System.Boolean
When true, the inputs are defensively copied and validated; when false, the supplied lists are adopted directly without cloning. Use false only when the caller owns freshly created, valid data that is not shared.
Initializes a new instance of the Mesh2D class from a JSON object.
public Mesh2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing mesh data.
Creates a clone of the current mesh.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the mesh.
Calculates the total area of the mesh as the sum of the areas of its triangles.
Uses scalar coordinate arithmetic only, without allocating intermediate objects.
public double GetArea();System.Double
A System.Double representing the total area, or System.Double.NaN if the points or indexes are unavailable.
Retrieves the auxiliary segments of the mesh.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetAuxiliarySegments();System.Collections.Generic.List<Segment2D>
A list of auxiliary segments, or null if the mesh is invalid.
Retrieves the boundary edges of the mesh as polygons.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? GetBoundaryEdges();System.Collections.Generic.List<Polygon2D>
A list of polygons forming the boundary, or null if the mesh is invalid.
Retrieves the boundary edges of the mesh as polygons and returns auxiliary segments via an out parameter.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Polygon2D>? GetBoundaryEdges(out System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? auxiliarySegments);auxiliarySegments System.Collections.Generic.List<Segment2D>
The output list of auxiliary segments.
System.Collections.Generic.List<Polygon2D>
A list of polygons forming the boundary, or null if the mesh is invalid.
Gets the axis-aligned bounding box of the mesh.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
The bounding box encompassing all points in the mesh.
Retrieves all unique segments (edges) of the mesh.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();System.Collections.Generic.List<Segment2D>
A list of all edges in the mesh, or null if the mesh is invalid.
Retrieves the triangle at the specified index.
public DiGi.Geometry.Planar.Classes.Triangle2D? GetTriangle(int index);index System.Int32
The zero-based index of the triangle.
Triangle2D
The Triangle2D at the specified index, or null if out of range.
Retrieves all triangles in the mesh.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Triangle2D>? GetTriangles();System.Collections.Generic.List<Triangle2D>
A list of all Triangle2D objects in the mesh, or null if the mesh is invalid.
Moves the mesh by translating all its vertices.
public bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Transforms the mesh by transforming all its vertices.
public bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Represents a point in 2D space defined by X and Y coordinates.
public class Point2D : DiGi.Geometry.Planar.Classes.Coordinate2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.IPoint<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.IPointInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Coordinate → Coordinate2D → Point2D
Implements DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.IPoint<Point2D>, DiGi.Geometry.Core.Interfaces.IPoint
Initializes a new instance of the Point2D class by cloning an existing point.
public Point2D(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The source point to clone.
Initializes a new instance of the Point2D class with specified X and Y coordinates.
public Point2D(double x, double y);The X coordinate.
The Y coordinate.
Initializes a new instance of the Point2D class using an array of values.
public Point2D(double[]? values);values System.Double[]
The array containing coordinate values.
Initializes a new instance of the Point2D class from a JSON object.
public Point2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing point data.
Creates a clone of the current point.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned DiGi.Core.Interfaces.ISerializableObject.
Calculates the distance between this point and another point.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The other point.
System.Double
The distance result, or NaN if the input is null.
Determines whether the specified System.Object is equal to the current Point2D.
public override bool Equals(object? obj);obj System.Object
The System.Object to compare with the current instance.
System.Boolean
true if the specified System.Object is a Point2D with equal component values; otherwise, false.
Gets a new point with absolute values of the coordinates.
public DiGi.Geometry.Planar.Classes.Point2D? GetAbs();Point2D
A new Point2D with absolute coordinate values.
Returns a hash code for the current Point2D.
public override int GetHashCode();System.Int32
An System.Int32 hash code.
Returns a new point moved by the specified vector.
public DiGi.Geometry.Planar.Classes.Point2D? GetMoved(DiGi.Geometry.Planar.Classes.Vector2D? vector3D);vector3D Vector2D
The movement vector.
Point2D
A new Point2D shifted by the vector, or null if input is null.
Checks if another point is within a specified distance from this point.
public bool InDistance(DiGi.Geometry.Planar.Classes.Point2D? point2D, double distance, double tolerance=1E-06);point2D Point2D
The other point to check.
distance System.Double
The maximum distance.
tolerance System.Double
The distance tolerance.
System.Boolean
True if the point is within the specified distance; otherwise, false.
Calculates the midpoint between this point and another point.
public DiGi.Geometry.Planar.Classes.Point2D? Mid(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The other point.
Point2D
A new Point2D representing the midpoint, or null if input is null.
Adds a vector to a point to produce a new point.
public static DiGi.Geometry.Planar.Classes.Point2D? operator +(DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Vector2D? vector2D);point2D Point2D
The origin point.
vector2D Vector2D
The translation vector.
Point2D
A new Point2D shifted by the vector, or null if either input is null.
Indicates whether two Point2D instances are equal.
public static bool operator ==(DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2);point2D_1 Point2D
The first Point2D to compare.
point2D_2 Point2D
The second Point2D to compare.
System.Boolean
true if the points are equal; otherwise, false.
Indicates whether two Point2D instances are not equal.
public static bool operator !=(DiGi.Geometry.Planar.Classes.Point2D? point2D_1, DiGi.Geometry.Planar.Classes.Point2D? point2D_2);point2D_1 Point2D
The first Point2D to compare.
point2D_2 Point2D
The second Point2D to compare.
System.Boolean
true if the points are not equal; otherwise, false.
Subtracts a vector from a point to produce a new point.
public static DiGi.Geometry.Planar.Classes.Point2D? operator -(DiGi.Geometry.Planar.Classes.Point2D? point2D, DiGi.Geometry.Planar.Classes.Vector2D? vector2D);point2D Point2D
The origin point.
vector2D Vector2D
The translation vector.
Point2D
A new Point2D shifted by the negative of the vector, or null if either input is null.
Represents a 2D polygon defined by a collection of vertices.
public class Polygon2D : DiGi.Geometry.Planar.Classes.Segmentable2D, DiGi.Geometry.Planar.Interfaces.IPolygon2D, DiGi.Geometry.Planar.Interfaces.IPolygonal2D, DiGi.Geometry.Planar.Interfaces.IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Planar.Interfaces.IInvertible2DInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Segmentable2D → Polygon2D
Derived
↳ Triangle2D
Implements DiGi.Geometry.Planar.Interfaces.IPolygon2D, IPolygonal2D, IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Planar.Interfaces.IInvertible2D
Initializes a new instance of the Polygon2D class.
public Polygon2D();Initializes a new instance of the Polygon2D class by cloning an existing polygon.
public Polygon2D(DiGi.Geometry.Planar.Classes.Polygon2D? polygon2D);polygon2D Polygon2D
The source polygon to clone.
Initializes a new instance of the Polygon2D class from another polygonal geometry.
public Polygon2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);polygonal2D IPolygonal2D
The source polygonal geometry.
Initializes a new instance of the Polygon2D class defined by a collection of points.
The points are stored as given. A polygon holds its ring open, because GetSegments() adds the closing segment itself, so a caller handing over a ring which repeats its first point as its last should build it through Polygon2D(this IEnumerable<Point2D>, double) instead - that is where the repeat is removed.
public Polygon2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The vertices of the polygon.
Initializes a new instance of the Polygon2D class from a prebuilt list of points.
internal Polygon2D(System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, bool clone);point2Ds System.Collections.Generic.List<Point2D>
The vertices of the polygon.
clone System.Boolean
When true, the points are defensively cloned; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created points that are not shared.
Initializes a new instance of the Polygon2D class from a JSON object.
public Polygon2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing polygon data.
Creates a clone of the current polygon.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the polygon.
Calculates the area of the polygon.
public virtual double GetArea();Implements GetArea()
System.Double
The area of the polygon.
Gets the centroid of the polygon.
public DiGi.Geometry.Planar.Classes.Point2D? GetCentroid();Implements GetCentroid()
Point2D
The center point of the polygon, or null if it cannot be determined.
Gets a point guaranteed to be inside the polygon boundaries.
public virtual DiGi.Geometry.Planar.Classes.Point2D? GetInternalPoint(double tolerance=1E-06);tolerance System.Double
The distance tolerance.
Implements GetInternalPoint(double)
Point2D
An internal point of the polygon, or null if it cannot be determined.
Gets the perimeter length of the polygon.
public double GetPerimeter();Implements GetPerimeter()
System.Double
The total length of the boundary.
Gets the segments that form the boundary of the polygon.
public override System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();Implements GetSegments()
System.Collections.Generic.List<Segment2D>
A list of boundary segments.
Checks if a bounding box is within or intersects the polygon.
public bool InRange(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, double tolerance=1E-06);boundingBox2D BoundingBox2D
The bounding box to check.
tolerance System.Double
The distance tolerance for the check.
Implements InRange(BoundingBox2D, double)
System.Boolean
True if they intersect or overlap; otherwise, false.
Checks if a point is within or on the boundary of the polygon.
public bool InRange(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements InRange(Point2D, double)
System.Boolean
True if the point is in range; otherwise, false.
Checks if a segmentable geometry is within or intersects the polygon boundaries.
public bool InRange(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The geometry to check.
tolerance System.Double
The distance tolerance for the check.
Implements InRange(ISegmentable2D, double)
System.Boolean
True if any part of the geometry is in range; otherwise, false.
Checks if a point is strictly inside the polygon boundaries.
public bool Inside(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements Inside(Point2D, double)
System.Boolean
True if the point is strictly inside; otherwise, false.
Checks if a segmentable geometry is strictly inside the polygon boundaries.
public bool Inside(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The geometry to check.
tolerance System.Double
The distance tolerance for the check.
Implements Inside(ISegmentable2D, double)
System.Boolean
True if all points of the geometry are strictly inside; otherwise, false.
Triangulates the polygon into a set of triangles.
public virtual System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Triangle2D>? Triangulate(double tolerance=1E-09);tolerance System.Double
The distance tolerance used during triangulation.
Implements Triangulate(double)
System.Collections.Generic.List<Triangle2D>
A list of Triangle2D objects representing the triangulated polygon, or null if it cannot be triangulated.
Provides functionality to update and verify the normalization of a 2D polygonal geometry based on a specified orientation.
public class Polygonal2DNormalizationUpdater : DiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>, DiGi.Geometry.Core.Interfaces.INormalizationUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>Inheritance System.Object → DiGi.Geometry.Core.Classes.GeometryUpdater<IPolygonal2D> → Polygonal2DNormalizationUpdater
Implements DiGi.Geometry.Core.Interfaces.INormalizationUpdater<IPolygonal2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<IPolygonal2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<IPolygonal2D>
Initializes a new instance of the Polygonal2DNormalizationUpdater class.
public Polygonal2DNormalizationUpdater(DiGi.Geometry.Core.Enums.Orientation orientation);orientation Orientation
The Orientation that the polygonal 2D object should be normalized to.
Determines whether the current value is normalized based on the specified orientation.
public bool Normalized();Implements Normalized()
System.Boolean
A System.Boolean value indicating true if the value is normalized; otherwise, false.
Updates the orientation of the value.
public override bool Update();Implements Update()
System.Boolean
A System.Boolean indicating whether the update was successful; returns false if the value is null.
Solves self-intersections for a 2D polygonal geometry.
public class Polygonal2DSelfIntersectionSolver : DiGi.Geometry.Core.Interfaces.IOneToOneGeometrySolver<DiGi.Geometry.Planar.Interfaces.IPolygonal2D, DiGi.Geometry.Planar.Interfaces.IPolygonal2D>, DiGi.Geometry.Core.Interfaces.IGeometrySolver, DiGi.Core.Interfaces.ISolver, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IOneToOneSolver<DiGi.Geometry.Planar.Interfaces.IPolygonal2D, DiGi.Geometry.Planar.Interfaces.IPolygonal2D>Inheritance System.Object → Polygonal2DSelfIntersectionSolver
Implements DiGi.Geometry.Core.Interfaces.IOneToOneGeometrySolver<IPolygonal2D,IPolygonal2D>, DiGi.Geometry.Core.Interfaces.IGeometrySolver, DiGi.Core.Interfaces.ISolver, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IOneToOneSolver<IPolygonal2D,IPolygonal2D>
Initializes a new instance of the Polygonal2DSelfIntersectionSolver class.
public Polygonal2DSelfIntersectionSolver(DiGi.Geometry.Planar.Interfaces.IPolygonal2D input, double maxLength, double tolerance=1E-06);input IPolygonal2D
The IPolygonal2D input geometry to be analyzed for self-intersections.
maxLength System.Double
The maximum length as a System.Double.
tolerance System.Double
The distance tolerance as a System.Double.
Initializes a new instance of the Polygonal2DSelfIntersectionSolver class.
public Polygonal2DSelfIntersectionSolver(double maxLength, double tolerance=1E-06);maxLength System.Double
The maximum length as a System.Double.
tolerance System.Double
The tolerance value as a System.Double.
Gets or sets the input IPolygonal2D.
public DiGi.Geometry.Planar.Interfaces.IPolygonal2D? Input { set; }Implements Input
Gets the resulting IPolygonal2D object produced by the solver.
public DiGi.Geometry.Planar.Interfaces.IPolygonal2D? Output { get; }Implements Output
IPolygonal2D
The IPolygonal2D instance, or null if no output has been generated or the solve operation failed.
Attempts to solve for self-intersecting polygons based on the input data, maximum length, and tolerance.
public bool Solve();Implements Solve()
System.Boolean
A System.Boolean value indicating whether a solution was successfully found.
Represents a two-dimensional polygonal face defined by an external edge and a collection of internal edges.
public class PolygonalFace2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D, DiGi.Geometry.Planar.Interfaces.IFace2D<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>, DiGi.Geometry.Planar.Interfaces.IFace2D, DiGi.Geometry.Core.Interfaces.IFace, DiGi.Geometry.Core.Interfaces.ISurface, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.ISurface2D, DiGi.Geometry.Core.Interfaces.IFace<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>, DiGi.Geometry.Planar.Interfaces.IInvertible2D, DiGi.Geometry.Core.Interfaces.IInvertibleInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → PolygonalFace2D
Implements IPolygonalFace2D, DiGi.Geometry.Planar.Interfaces.IFace2D<IPolygonal2D>, IFace2D, DiGi.Geometry.Core.Interfaces.IFace, DiGi.Geometry.Core.Interfaces.ISurface, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.ISurface2D, DiGi.Geometry.Core.Interfaces.IFace<IPolygonal2D>, DiGi.Geometry.Planar.Interfaces.IInvertible2D, DiGi.Geometry.Core.Interfaces.IInvertible
Initializes a new instance of the PolygonalFace2D class by cloning an existing polygonal face.
public PolygonalFace2D(DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D);polygonalFace2D PolygonalFace2D
The source polygonal face to clone.
Initializes a new instance of the PolygonalFace2D class with specified external and internal edges.
internal PolygonalFace2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? externalEdge, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? internalEdges=null);externalEdge IPolygonal2D
The outer boundary of the face.
internalEdges System.Collections.Generic.IEnumerable<IPolygonal2D>
The inner boundaries (holes) of the face.
Initializes a new instance of the PolygonalFace2D class from prebuilt edges.
internal PolygonalFace2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? externalEdge, System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? internalEdges, bool clone);externalEdge IPolygonal2D
The outer boundary of the face.
internalEdges System.Collections.Generic.List<IPolygonal2D>
The inner boundaries (holes) of the face.
clone System.Boolean
When true, the edges are defensively cloned; when false, the supplied edges are adopted directly without cloning. Use false only when the caller owns freshly created edges that are not shared.
Initializes a new instance of the PolygonalFace2D class from a JSON object.
public PolygonalFace2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing polygonal face data.
Gets all edges of the polygonal face, including both external and internal boundaries.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? Edges { get; }Implements Edges
System.Collections.Generic.List<IPolygonal2D>
Gets the external boundary of the polygonal face.
public DiGi.Geometry.Planar.Interfaces.IPolygonal2D? ExternalEdge { get; }Implements ExternalEdge
Gets the internal boundaries (holes) of the polygonal face.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Interfaces.IPolygonal2D>? InternalEdges { get; }Implements InternalEdges
System.Collections.Generic.List<IPolygonal2D>
Creates a clone of the current polygonal face.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the polygonal face.
Finds the point on the polygonal face closest to the given point.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The target point.
tolerance System.Double
The distance tolerance for the check.
Implements ClosestPoint(Point2D, double)
Point2D
The closest point on the face (including its interior), or null if it cannot be determined.
Calculates the area of the polygonal face (external area minus internal hole areas).
public double GetArea();Implements GetArea()
System.Double
The net area of the face.
Gets the axis-aligned bounding box of the polygonal face.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
The bounding box based on the external boundary.
Gets a point guaranteed to be inside the polygonal face (outside of any holes).
public DiGi.Geometry.Planar.Classes.Point2D? GetInternalPoint(double tolerance=1E-06);tolerance System.Double
The distance tolerance.
Implements GetInternalPoint(double)
Point2D
An internal point of the face, or null if it cannot be determined.
Checks if a point is within or on the boundary of the polygonal face.
public bool InRange(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements InRange(Point2D, double)
System.Boolean
True if the point is in range; otherwise, false.
Checks if a point is strictly inside the polygonal face (excluding boundaries and holes).
public bool Inside(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements Inside(Point2D, double)
System.Boolean
True if the point is strictly inside; otherwise, false.
Reverses the orientation of both external and internal boundaries.
public bool Inverse();Implements Inverse()
System.Boolean
True if at least one boundary was successfully reversed.
Moves the polygonal face by translating its boundaries.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful.
Checks if a point lies on any of the edges (external or internal) of the face.
public bool OnEdge(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
Implements OnEdge(Point2D, double)
System.Boolean
True if the point is on an edge; otherwise, false.
Orients the external and internal boundaries of the face.
public bool Orient(System.Nullable<DiGi.Geometry.Core.Enums.Orientation> externalEdgeOrientation, System.Nullable<DiGi.Geometry.Core.Enums.Orientation> internalEdgeOrientation);externalEdgeOrientation System.Nullable<Orientation>
The desired orientation for the external boundary.
internalEdgeOrientation System.Nullable<Orientation>
The desired orientation for the internal boundaries.
Implements Orient(Nullable<Orientation>, Nullable<Orientation>)
System.Boolean
True if at least one boundary was successfully oriented.
Transforms the polygonal face by transforming its boundaries.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful.
Triangulates the polygonal face into a set of triangles.
public virtual System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Triangle2D>? Triangulate(double tolerance=1E-09);tolerance System.Double
The distance tolerance used during triangulation.
Implements Triangulate(double)
System.Collections.Generic.List<Triangle2D>
A list of Triangle2D objects representing the triangulated face, or null if it cannot be triangulated.
Provides a solver for calculating internal points within an IPolygonalFace2D.
public class PolygonalFace2DInternalPointSolver : DiGi.Geometry.Core.Classes.InternalPointSolver<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D, DiGi.Geometry.Planar.Classes.Point2D>Inheritance System.Object → DiGi.Geometry.Core.Classes.InternalPointSolver<IPolygonalFace2D,Point2D> → PolygonalFace2DInternalPointSolver
Initializes a new instance of the PolygonalFace2DInternalPointSolver class.
public PolygonalFace2DInternalPointSolver(double tolerance=1E-06);tolerance System.Double
The System.Double value representing the distance tolerance used for calculations.
Initializes a new instance of the PolygonalFace2DInternalPointSolver class.
public PolygonalFace2DInternalPointSolver(int maxCount, double tolerance=1E-06);maxCount System.Int32
The maximum number of points to solve for as an System.Int32.
tolerance System.Double
The distance tolerance used in calculations as a System.Double.
Gets or sets the IPolygonalFace2D used as the input for the operation.
public override DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? Input { set; }Implements Input
IPolygonalFace2D
The IPolygonalFace2D instance that serves as the input.
Attempts to solve the current problem instance based on the polygonal face and existing outputs.
public override bool Solve();Implements Solve()
System.Boolean
A System.Boolean value indicating whether the solution was successfully found; returns false if the polygonal face is null, the maximum output count has been reached, or the external edge area is below the specified tolerance.
Updates the normalization of a 2D polygonal face based on specified edge orientations.
public class PolygonalFace2DNormalizationUpdater : DiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D>, DiGi.Geometry.Core.Interfaces.INormalizationUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D>Inheritance System.Object → DiGi.Geometry.Core.Classes.GeometryUpdater<IPolygonalFace2D> → PolygonalFace2DNormalizationUpdater
Implements DiGi.Geometry.Core.Interfaces.INormalizationUpdater<IPolygonalFace2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<IPolygonalFace2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<IPolygonalFace2D>
Initializes a new instance of the PolygonalFace2DNormalizationUpdater class using the specified Orientation for both external and internal edges.
public PolygonalFace2DNormalizationUpdater(DiGi.Geometry.Core.Enums.Orientation orientation);orientation Orientation
The Orientation to be used for normalization of both external and internal edges.
Initializes a new instance of the PolygonalFace2DNormalizationUpdater class with the specified orientations for external and internal edges.
public PolygonalFace2DNormalizationUpdater(System.Nullable<DiGi.Geometry.Core.Enums.Orientation> externalEdgeOrientation, System.Nullable<DiGi.Geometry.Core.Enums.Orientation> internalEdgeOrientation);externalEdgeOrientation System.Nullable<Orientation>
The optional Orientation used to validate the normalization of the external edge.
internalEdgeOrientation System.Nullable<Orientation>
The optional Orientation used to validate the normalization of internal edges.
Determines whether the current value is normalized based on the external and internal edge orientations.
public bool Normalized();Implements Normalized()
System.Boolean
A System.Boolean value indicating whether the value is normalized.
Updates the orientation of the value based on the external and internal edge orientations.
public override bool Update();Implements Update()
System.Boolean
A System.Boolean indicating whether the update was successful; returns false if the value is null.
Represents a 2D polyline defined by a sequence of vertices.
public class Polyline2D : DiGi.Geometry.Planar.Classes.Segmentable2DInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Segmentable2D → Polyline2D
Initializes a new instance of the Polyline2D class.
public Polyline2D();Initializes a new instance of the Polyline2D class by cloning an existing polyline.
public Polyline2D(DiGi.Geometry.Planar.Classes.Polyline2D? polyline2D);polyline2D Polyline2D
The source polyline to clone.
Initializes a new instance of the Polyline2D class defined by a collection of points.
public Polyline2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The vertices of the polyline.
Initializes a new instance of the Polyline2D class defined by vertices and whether it is closed.
public Polyline2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, bool close);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The vertices of the polyline.
close System.Boolean
True if the polyline should be closed by connecting the last point to the first.
Initializes a new instance of the Polyline2D class from a JSON object.
public Polyline2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing polyline data.
Creates a clone of the current polyline.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned instance of the polyline.
Closes the polyline by adding a point at the end that matches the start point.
public void Close();Gets the segments that form the polyline boundary.
public override System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();Implements GetSegments()
System.Collections.Generic.List<Segment2D>
A list of line segments.
Checks if the polyline is closed (start point equals end point).
public bool IsClosed();System.Boolean
True if it is closed; otherwise, false.
Opens the polyline by removing the last point if it is closed.
public void Open();Represents a ray in two-dimensional space, defined by an origin point and a direction vector.
public class Ray2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.ILinear2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IInvertible2D, DiGi.Geometry.Core.Interfaces.IInvertibleInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Ray2D
Implements ILinear2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IInvertible2D, DiGi.Geometry.Core.Interfaces.IInvertible
Initializes a new instance of the Ray2D class with the specified origin and direction.
public Ray2D(DiGi.Geometry.Planar.Classes.Point2D? origin, DiGi.Geometry.Planar.Classes.Vector2D? direction);origin Point2D
The Point2D that represents the starting point of the ray.
direction Vector2D
The Vector2D that represents the direction of the ray.
Initializes a new instance of the Ray2D class by copying the values from an existing Ray2D instance.
public Ray2D(DiGi.Geometry.Planar.Classes.Ray2D? ray2D);ray2D Ray2D
The Ray2D instance to copy from.
Gets or sets the Vector2D representing the direction.
public DiGi.Geometry.Planar.Classes.Vector2D? Direction { get; set; }Implements Direction
Vector2D
A nullable Vector2D that specifies the direction.
Gets or sets the origin Point2D.
public DiGi.Geometry.Planar.Classes.Point2D? Origin { get; set; }Point2D
The Point2D representing the origin, or null if it is not specified.
Creates a copy of the current Ray2D instance.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance.
Calculates the closest Point2D on the line to the specified Point2D.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The Point2D for which the closest point is calculated.
Implements ClosestPoint(Point2D)
Point2D
The closest Point2D, or null if the origin or direction is not defined.
Determines whether this linear 2D object is collinear with the specified ILinear2D object within a given tolerance.
public bool Collinear(DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D, double tolerance=1E-06);linear2D ILinear2D
The ILinear2D object to check for collinearity.
tolerance System.Double
The System.Double value representing the distance tolerance used to determine collinearity.
Implements Collinear(ILinear2D, double)
System.Boolean
A System.Boolean value indicating whether the two linear 2D objects are collinear.
Calculates the distance from a specified Point2D to the ray.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The Point2D instance for which the distance is calculated.
Implements Distance(Point2D)
System.Double
The shortest distance as a System.Double, or System.Double.NaN if the provided Point2D is null, or if the ray's origin or direction are not defined.
Determines whether the specified System.Object is equal to the current Ray2D.
public override bool Equals(object? obj);obj System.Object
The System.Object to compare with the current Ray2D.
System.Boolean
true if the specified System.Object is a Ray2D and has the same origin and direction as the current instance; otherwise, false.
Returns a hash code for the current object based on the origin and direction.
public override int GetHashCode();System.Int32
An System.Int32 representing the hash code of the instance.
Calculates the intersection point between this ray and another specified Ray2D.
public DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Ray2D? ray2D, double tolerance=1E-06);ray2D Ray2D
The other Ray2D to intersect with.
tolerance System.Double
A System.Double value specifying the distance tolerance for the intersection calculation and verification.
Point2D
A Point2D representing the intersection point if it exists within the specified tolerance; otherwise, null.
Calculates the intersection point between this segment and another Segment2D.
public DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);segment2D Segment2D
The Segment2D to check for an intersection.
tolerance System.Double
A System.Double value representing the distance tolerance used for the intersection calculation.
Point2D
A Point2D if an intersection point exists and lies on both segments; otherwise, null.
Inverts the current direction.
public bool Inverse();Implements Inverse()
System.Boolean
A System.Boolean value indicating whether the inversion was successful.
Moves the object by the specified Vector2D.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The Vector2D that defines the movement offset.
System.Boolean
True if the move operation was successful; otherwise, false.
Determines whether the specified Point2D is on the object within a given tolerance.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The Point2D to evaluate.
tolerance System.Double
The System.Double value representing the distance tolerance.
Implements On(Point2D, double)
System.Boolean
A System.Boolean value indicating whether the point is on the object within the specified tolerance.
Projects the specified Point2D onto the ray, clamping points behind the origin to the origin.
public DiGi.Geometry.Planar.Classes.Point2D? Project(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The Point2D to project.
Implements Project(Point2D)
Point2D
The projected Point2D on the ray, or null if the input point or the ray is not properly defined.
Transforms the object's origin and direction using the provided 2D transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The DiGi.Geometry.Planar.Interfaces.ITransform2D instance used to perform the transformation.
System.Boolean
A System.Boolean value indicating whether the transformation was successfully applied; returns false if the DiGi.Geometry.Planar.Interfaces.ITransform2D transform, origin, or direction is null.
Indicates whether the two specified Ray2D instances are equal.
public static bool operator ==(DiGi.Geometry.Planar.Classes.Ray2D? ray2D_1, DiGi.Geometry.Planar.Classes.Ray2D? ray2D_2);ray2D_1 Ray2D
The first Ray2D instance to compare.
ray2D_2 Ray2D
The second Ray2D instance to compare.
System.Boolean
true if the two rays are equal; otherwise, false.
Explicitly converts a Segment2D instance to a Ray2D instance.
public static DiGi.Geometry.Planar.Classes.Ray2D? explicit operator DiGi.Geometry.Planar.Classes.Ray2D?(DiGi.Geometry.Planar.Classes.Segment2D? segment2D);segment2D Segment2D
The Segment2D instance to convert.
Ray2D
A Ray2D instance derived from the specified segment, or null if the input is null.
Indicates whether the two specified Ray2D instances are not equal.
public static bool operator !=(DiGi.Geometry.Planar.Classes.Ray2D? ray2D_1, DiGi.Geometry.Planar.Classes.Ray2D? ray2D_2);ray2D_1 Ray2D
The first Ray2D instance to compare.
ray2D_2 Ray2D
The second Ray2D instance to compare.
System.Boolean
true if the two rays are not equal; otherwise, false.
Represents a two-dimensional rectangle defined by its width and height.
public class Rectangle2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.IPolygonal2D, DiGi.Geometry.Planar.Interfaces.IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Planar.Interfaces.IInvertible2DInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Rectangle2D
Implements IPolygonal2D, IClosedCurve2D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Planar.Interfaces.IInvertible2D
Initializes a new instance of the Rectangle2D class from a bounding box.
public Rectangle2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D);boundingBox2D BoundingBox2D
The source bounding box.
Initializes a new instance of the Rectangle2D class with specified origin, width, and height.
public Rectangle2D(DiGi.Geometry.Planar.Classes.Point2D? origin, double width, double height);origin Point2D
The origin point of the rectangle.
width System.Double
The width of the rectangle.
height System.Double
The height of the rectangle.
Initializes a new instance of the Rectangle2D class with specified origin, width, height, and height direction vector.
public Rectangle2D(DiGi.Geometry.Planar.Classes.Point2D? origin, double width, double height, DiGi.Geometry.Planar.Classes.Vector2D? heightDirection);origin Point2D
The origin point of the rectangle.
width System.Double
The width of the rectangle.
height System.Double
The height of the rectangle.
heightDirection Vector2D
The vector defining the direction of the height.
Initializes a new instance of the Rectangle2D class by cloning an existing rectangle.
public Rectangle2D(DiGi.Geometry.Planar.Classes.Rectangle2D? rectangle2D);rectangle2D Rectangle2D
The source rectangle to clone.
Initializes a new instance of the Rectangle2D class with specified width and height at the origin.
public Rectangle2D(double width, double height);width System.Double
The width of the rectangle.
height System.Double
The height of the rectangle.
Initializes a new instance of the Rectangle2D class from a JSON object.
public Rectangle2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing rectangle data.
Gets or sets the height of the rectangle.
public double Height { get; set; }Gets the unit vector defining the height direction of the rectangle.
public DiGi.Geometry.Planar.Classes.Vector2D? HeightDirection { get; }Gets the perimeter of the rectangle.
public double Length { get; }Implements Length
Gets or sets the origin point of the rectangle.
public DiGi.Geometry.Planar.Classes.Point2D? Origin { get; set; }Gets or sets the width of the rectangle.
public double Width { get; set; }Gets the unit vector defining the width direction of the rectangle.
public DiGi.Geometry.Planar.Classes.Vector2D? WidthDirection { get; }Creates a clone of the current rectangle.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject representing the cloned rectangle.
Calculates the closest point on the rectangle to the specified point.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Point2D
The closest point on the rectangle's boundary or interior, or null if input is invalid.
Calculates the area of the rectangle.
public double GetArea();Implements GetArea()
System.Double
The area as a double.
Generates a bounding box that encloses the rectangle.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
A new BoundingBox2D instance, or null if it cannot be created.
Calculates the centroid (center point) of the rectangle.
public DiGi.Geometry.Planar.Classes.Point2D? GetCentroid();Implements GetCentroid()
Point2D
The centroid as a Point2D, or null if it cannot be calculated.
Retrieves the diagonals of the rectangle as segments.
public DiGi.Geometry.Planar.Classes.Segment2D[]? GetDiagonals();Segment2D[]
An array of two Segment2D representing the diagonals, or null if points cannot be retrieved.
Finds a point known to be inside the rectangle.
public DiGi.Geometry.Planar.Classes.Point2D? GetInternalPoint(double tolerance=1E-06);tolerance System.Double
The distance tolerance for internal checking.
Implements GetInternalPoint(double)
Point2D
A Point2D located within the rectangle, or null.
Calculates the perimeter of the rectangle.
public double GetPerimeter();Implements GetPerimeter()
System.Double
The total length of the boundary.
Retrieves the four corner points of the rectangle.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? GetPoints();Implements GetPoints()
System.Collections.Generic.List<Point2D>
A list of Point2D representing the corners, or null if the origin is not set.
Retrieves the four boundary segments of the rectangle.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();Implements GetSegments()
System.Collections.Generic.List<Segment2D>
A list of Segment2D representing the sides, or null if points cannot be retrieved.
Checks if the specified bounding box is within range of the rectangle.
public bool InRange(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, double tolerance=1E-06);boundingBox2D BoundingBox2D
The target bounding box.
tolerance System.Double
The distance tolerance for the range check.
Implements InRange(BoundingBox2D, double)
System.Boolean
True if the bounding box is in range, otherwise false.
Checks if the specified point is within range of the rectangle's boundary or interior.
public bool InRange(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The target point.
tolerance System.Double
The distance tolerance for the range check.
Implements InRange(Point2D, double)
System.Boolean
True if the point is in range, otherwise false.
Checks if the specified segmentable object is within range of the rectangle's boundary or interior.
public bool InRange(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The object to check.
tolerance System.Double
The distance tolerance for the range check.
Implements InRange(ISegmentable2D, double)
System.Boolean
True if the object is in range, otherwise false.
Checks if the specified point is strictly inside the rectangle.
public bool Inside(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The target point.
tolerance System.Double
The distance tolerance for the inside check.
Implements Inside(Point2D, double)
System.Boolean
True if the point is inside, otherwise false.
Checks if the specified segmentable object is strictly inside the rectangle.
public bool Inside(DiGi.Geometry.Planar.Interfaces.ISegmentable2D? segmentable2D, double tolerance=1E-06);segmentable2D ISegmentable2D
The object to check.
tolerance System.Double
The distance tolerance for the inside check.
Implements Inside(ISegmentable2D, double)
System.Boolean
True if the object is inside, otherwise false.
Inverts the orientation of the rectangle by moving its origin to the opposite corner and reversing height direction.
public bool Inverse();Implements Inverse()
System.Boolean
True if inversion was successful, otherwise false.
Moves the rectangle by the specified vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if move was successful, otherwise false.
Checks if the specified point lies on the boundary of the rectangle.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The target point.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the boundary, otherwise false.
Applies a 2D transformation to the rectangle.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transform to apply.
System.Boolean
True if transformation was successful, otherwise false.
Splits the rectangle into two triangles.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Triangle2D>? Triangulate(double tolerance=1E-09);tolerance System.Double
The distance tolerance for triangulation.
Implements Triangulate(double)
System.Collections.Generic.List<Triangle2D>
A list of two Triangle2D, or null if it cannot be triangulated.
Explicitly converts a Rectangle2D to a Polygon2D.
public static DiGi.Geometry.Planar.Classes.Polygon2D? explicit operator DiGi.Geometry.Planar.Classes.Polygon2D?(DiGi.Geometry.Planar.Classes.Rectangle2D? rectangle2D);rectangle2D Rectangle2D
The rectangle to convert.
Polygon2D
A new Polygon2D representing the rectangle, or null if conversion fails.
Explicitly converts a BoundingBox2D to a Rectangle2D.
public static DiGi.Geometry.Planar.Classes.Rectangle2D? explicit operator DiGi.Geometry.Planar.Classes.Rectangle2D?(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D);boundingBox2D BoundingBox2D
The bounding box to convert.
Rectangle2D
A new Rectangle2D instance, or null if the input is null.
Represents a two-dimensional line segment defined by a starting Point2D and a Vector2D.
public class Segment2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.IInvertible2D, DiGi.Geometry.Planar.Interfaces.ILinear2D, DiGi.Geometry.Core.Interfaces.ISegment<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Segment2D
Implements ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.IInvertible2D, ILinear2D, DiGi.Geometry.Core.Interfaces.ISegment<Point2D>, DiGi.Geometry.Core.Interfaces.ISegment
Initializes a new instance of the Segment2D class using start and end points.
public Segment2D(DiGi.Geometry.Planar.Classes.Point2D? start, DiGi.Geometry.Planar.Classes.Point2D? end);start Point2D
The start point of the segment.
end Point2D
The end point of the segment.
Initializes a new instance of the Segment2D class using a start point and a vector.
public Segment2D(DiGi.Geometry.Planar.Classes.Point2D? start, DiGi.Geometry.Planar.Classes.Vector2D? vector);start Point2D
The start point of the segment.
vector Vector2D
The vector defining the direction and length of the segment.
Initializes a new instance of the Segment2D class by cloning an existing segment.
public Segment2D(DiGi.Geometry.Planar.Classes.Segment2D? segment2D);segment2D Segment2D
The source segment to clone.
Initializes a new instance of the Segment2D class defined by start and end coordinates.
public Segment2D(double x_1, double y_1, double x_2, double y_2);x_1 System.Double
The X coordinate of the start point.
y_1 System.Double
The Y coordinate of the start point.
x_2 System.Double
The X coordinate of the end point.
y_2 System.Double
The Y coordinate of the end point.
Initializes a new instance of the Segment2D class from a JSON object.
public Segment2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing segment data.
Gets or sets the unit direction vector of the segment.
public DiGi.Geometry.Planar.Classes.Vector2D? Direction { get; set; }Implements Direction
Gets or sets the end point of the segment.
public DiGi.Geometry.Planar.Classes.Point2D? End { get; set; }Implements End
Gets or sets the length of the segment.
public double Length { get; set; }Implements Length
Gets the squared length of the segment.
public double SquaredLength { get; }Gets or sets the start point of the segment.
public DiGi.Geometry.Planar.Classes.Point2D? Start { get; set; }Implements Start
Gets the point at the specified index of the segment.
public DiGi.Geometry.Planar.Classes.Point2D? this[int index] { get; }index System.Int32
The zero-based index of the point to retrieve (0 for the start point, 1 for the end point).
Gets or sets the vector defining the segment.
public DiGi.Geometry.Planar.Classes.Vector2D? Vector { get; set; }Creates a clone of the current segment.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A cloned DiGi.Core.Interfaces.ISerializableObject.
Finds the point on the segment closest to the specified point.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Implements ClosestPoint(Point2D)
Point2D
The closest Point2D on the segment, or null if input is null.
Checks if the segment is collinear with another linear geometry.
public bool Collinear(DiGi.Geometry.Planar.Interfaces.ILinear2D? linear2D, double tolerance=1E-06);linear2D ILinear2D
The other linear geometry.
tolerance System.Double
The distance tolerance.
Implements Collinear(ILinear2D, double)
System.Boolean
True if they are collinear; otherwise, false.
Calculates the minimum distance from a point to the segment.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Implements Distance(Point2D)
System.Double
The distance result, or NaN if input is null.
Determines whether the specified object is equal to the current segment.
public override bool Equals(object? obj);obj System.Object
The object to compare with.
System.Boolean
True if the objects are equal; otherwise, false.
Calculates the axis-aligned bounding box of the segment.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
A new BoundingBox2D, or null if start or vector is null.
Gets the hash code for this segment based on its start point and vector coordinates.
public override int GetHashCode();System.Int32
A 32-bit signed integer hash code.
Returns a list containing the start and end points of the segment.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? GetPoints();Implements GetPoints()
System.Collections.Generic.List<Point2D>
A list of two points, or null if endpoints are missing.
Returns a list containing the current segment as its only element.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();Implements GetSegments()
System.Collections.Generic.List<Segment2D>
A list of one Segment2D.
Finds the intersection point between this segment and another.
public DiGi.Geometry.Planar.Classes.Point2D? IntersectionPoint(DiGi.Geometry.Planar.Classes.Segment2D? segment2D, double tolerance=1E-06);segment2D Segment2D
The other segment.
tolerance System.Double
The distance tolerance for detecting an intersection.
Point2D
The Point2D of intersection, or null if no intersection is found.
Inverts the direction of the segment by swapping start and end points.
public bool Inverse();Implements Inverse()
System.Boolean
True if inversion was successful; otherwise, false.
Calculates the midpoint of the segment.
public DiGi.Geometry.Planar.Classes.Point2D? Mid();Point2D
The midpoint as a Point2D, or null if start or vector is missing.
Moves the segment by the specified translation vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The movement vector.
System.Boolean
True if move was successful; otherwise, false.
Checks if the specified point lies on the segment within a given tolerance.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The target point.
tolerance System.Double
The distance tolerance for the check.
Implements On(Point2D, double)
System.Boolean
True if the point is on the segment; otherwise, false.
Checks if the point given by its coordinates lies on the segment within a given tolerance, without allocating.
internal bool On(double x, double y, double tolerance);The X coordinate of the target point.
The Y coordinate of the target point.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the segment; otherwise, false.
Projects a point onto the line containing the segment, without clamping to the segment boundaries.
public DiGi.Geometry.Planar.Classes.Point2D? Project(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Implements Project(Point2D)
Point2D
The projected Point2D on the infinite line, or null if input is missing.
Applies a 2D transformation to the segment's endpoints and vector.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transform to apply.
System.Boolean
True if transformation was successful; otherwise, false.
Gets the endpoint coordinates of the segment without allocating intermediate points.
internal bool TryGetCoordinates(out double x_Start, out double y_Start, out double x_End, out double y_End);x_Start System.Double
When this method returns true, the X coordinate of the start point.
y_Start System.Double
When this method returns true, the Y coordinate of the start point.
x_End System.Double
When this method returns true, the X coordinate of the end point.
y_End System.Double
When this method returns true, the Y coordinate of the end point.
System.Boolean
True if the segment has a valid start point and vector; otherwise, false.
Checks if two segments are equal.
public static bool operator ==(DiGi.Geometry.Planar.Classes.Segment2D? segment2D_1, DiGi.Geometry.Planar.Classes.Segment2D? segment2D_2);segment2D_1 Segment2D
The first segment.
segment2D_2 Segment2D
The second segment.
System.Boolean
True if the segments have the same start point and vector; otherwise, false.
Checks if two segments are not equal.
public static bool operator !=(DiGi.Geometry.Planar.Classes.Segment2D? segment2D_1, DiGi.Geometry.Planar.Classes.Segment2D? segment2D_2);segment2D_1 Segment2D
The first segment.
segment2D_2 Segment2D
The second segment.
System.Boolean
True if the segments are different; otherwise, false.
Base class for 2D geometries that can be represented as a collection of segments.
public abstract class Segmentable2D : DiGi.Geometry.Planar.Classes.Geometry2D, DiGi.Geometry.Planar.Interfaces.ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<DiGi.Geometry.Planar.Classes.Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<DiGi.Geometry.Planar.Classes.Vector2D>, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, DiGi.Geometry.Planar.Interfaces.IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.IInvertible2DInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Geometry2D → Segmentable2D
Derived
↳ Polygon2D
↳ Polyline2D
Implements ISegmentable2D, DiGi.Geometry.Core.Interfaces.ISegmentable<Point2D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Planar.Interfaces.IMovable2D, DiGi.Geometry.Core.Interfaces.IMovable<Vector2D>, DiGi.Geometry.Planar.Interfaces.ICurve2D, DiGi.Geometry.Planar.Interfaces.IGeometry2D, DiGi.Geometry.Planar.Interfaces.ITransformable2D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Planar.Interfaces.ITransform2D>, DiGi.Geometry.Core.Interfaces.ITransformable, DiGi.Geometry.Planar.Interfaces.ICollectable2D, DiGi.Geometry.Core.Interfaces.ICollectable, IBoundable2D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Planar.Interfaces.IInvertible2D
Initializes a new instance of the Segmentable2D class.
public Segmentable2D();Initializes a new instance of the Segmentable2D class by cloning an existing segmentable geometry.
public Segmentable2D(DiGi.Geometry.Planar.Classes.Segmentable2D? segmentable2D);segmentable2D Segmentable2D
The source geometry to clone.
Initializes a new instance of the Segmentable2D class defined by a collection of points.
public Segmentable2D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);point2Ds System.Collections.Generic.IEnumerable<Point2D>
The vertices of the geometry.
Initializes a new instance of the Segmentable2D class from a prebuilt list of points.
internal Segmentable2D(System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds, bool clone);point2Ds System.Collections.Generic.List<Point2D>
The vertices of the geometry.
clone System.Boolean
When true, the points are defensively cloned; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created points that are not shared.
Initializes a new instance of the Segmentable2D class from a JSON object.
public Segmentable2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing geometry data.
Gets the total length of the segments that form the geometry.
public double Length { get; }Implements Length
Gets the point on the geometry closest to the specified point.
public DiGi.Geometry.Planar.Classes.Point2D? ClosestPoint(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
Point2D
The closest point on the geometry, or null if it cannot be determined.
Calculates the shortest distance from the geometry to the specified point.
public double Distance(DiGi.Geometry.Planar.Classes.Point2D? point2D);point2D Point2D
The target point.
System.Double
The distance to the point, or NaN if it cannot be calculated.
Gets the bounding box of the geometry.
public DiGi.Geometry.Planar.Classes.BoundingBox2D? GetBoundingBox();Implements GetBoundingBox()
BoundingBox2D
The bounding box, or null if it cannot be determined.
Gets the collection of points that define the geometry.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? GetPoints();Implements GetPoints()
System.Collections.Generic.List<Point2D>
A cloned list of vertices, or null if none exist.
Gets the collection of points that define the geometry.
public System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? GetPoints(bool clone);clone System.Boolean
When true, the returned list contains cloned points; when false, the internal list is returned directly without cloning and must not be mutated by the caller.
System.Collections.Generic.List<Point2D>
The vertices of the geometry, or null if none exist.
Gets the segments that form the geometry.
public abstract System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Segment2D>? GetSegments();Implements GetSegments()
System.Collections.Generic.List<Segment2D>
A list of boundary segments, or null if none exist.
Reverses the order of the points defining the geometry.
public bool Inverse();Implements Inverse()
System.Boolean
True if the reversal was successful; otherwise, false.
Moves the geometry by the specified vector.
public override bool Move(DiGi.Geometry.Planar.Classes.Vector2D? vector2D);vector2D Vector2D
The translation vector.
System.Boolean
True if the move was successful; otherwise, false.
Checks if the specified point lies on the geometry within a given tolerance.
public bool On(DiGi.Geometry.Planar.Classes.Point2D? point2D, double tolerance=1E-06);point2D Point2D
The point to check.
tolerance System.Double
The distance tolerance for the check.
System.Boolean
True if the point is on the geometry; otherwise, false.
Transforms the geometry using the specified transformation.
public override bool Transform(DiGi.Geometry.Planar.Interfaces.ITransform2D? transform);transform DiGi.Geometry.Planar.Interfaces.ITransform2D
The transformation to apply.
System.Boolean
True if the transformation was successful; otherwise, false.
Represents a result of a trace operation in 2D space that can be segmented into a point, segment, or vector.
public class SegmentableTraceResult2D : DiGi.Core.Classes.SerializableObjectInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → SegmentableTraceResult2D
Initializes a new instance of the SegmentableTraceResult2D class by copying the values from an existing SegmentableTraceResult2D instance.
public SegmentableTraceResult2D(DiGi.Geometry.Planar.Classes.SegmentableTraceResult2D? segmentableTraceResult2D);segmentableTraceResult2D SegmentableTraceResult2D
The SegmentableTraceResult2D instance to copy data from.
Initializes a new instance of the SegmentableTraceResult2D class using the specified System.Text.Json.Nodes.JsonObject.
public SegmentableTraceResult2D(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The System.Text.Json.Nodes.JsonObject used to initialize the current instance.
Hit Point
public DiGi.Geometry.Planar.Classes.Point2D? Point2D { get; }Hit Segment
public DiGi.Geometry.Planar.Classes.Segment2D? Segment2D { get; }Hit direction
public DiGi.Geometry.Planar.Classes.Vector2D? Vector2D { get; }Creates a clone of the current object.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a copy of the current object, or null.
Provides functionality to update geometry by snapping it based on a specified tolerance.
public class SnapperUpdater : DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>Inheritance System.Object → SnapperUpdater
Implements DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
Initializes a new instance of the SnapperUpdater class.
public SnapperUpdater();Initializes a new instance of the SnapperUpdater class.
public SnapperUpdater(double tolerance);tolerance System.Double
The System.Double tolerance value used for snapping operations.
Gets or sets the DiGi.Geometry.Planar.Interfaces.IGeometry2D value to be processed during the update operation.
public DiGi.Geometry.Planar.Interfaces.IGeometry2D? Value { get; set; }Implements Value
DiGi.Geometry.Planar.Interfaces.IGeometry2D
The DiGi.Geometry.Planar.Interfaces.IGeometry2D instance.
Updates the current value by snapping the geometry to itself using a specified tolerance.
public bool Update();Implements Update()
System.Boolean
A System.Boolean indicating whether the update operation was successful.
Provides functionality to update an DiGi.Geometry.Planar.Interfaces.IGeometry2D while preserving its topological structure.
public class TopologyPreservingUpdater : DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>Inheritance System.Object → TopologyPreservingUpdater
Implements DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Planar.Interfaces.IGeometry2D>
Initializes a new instance of the TopologyPreservingUpdater class.
public TopologyPreservingUpdater();Initializes a new instance of the TopologyPreservingUpdater class with the specified tolerance.
public TopologyPreservingUpdater(double tolerance);tolerance System.Double
The System.Double value used as the tolerance for preserving topology during updates.
Gets or sets the DiGi.Geometry.Planar.Interfaces.IGeometry2D value.
public DiGi.Geometry.Planar.Interfaces.IGeometry2D? Value { get; set; }Implements Value
DiGi.Geometry.Planar.Interfaces.IGeometry2D
Updates the current value by simplifying its geometry while preserving topology.
pu