• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Paramdigma.Core
    • Convert
    • Intersect3D
    • Intersect3D.LineLineIntersectionResult
    • Intersect3D.LineLineIntersectionStatus
    • Intersect3D.LinePlaneIntersectionStatus
    • Intersect3D.RayFacePerimeterIntersectionStatus
    • Settings
  • Paramdigma.Core.Collections
    • Interval
    • Matrix<T>
  • Paramdigma.Core.Curves
    • Geodesics
    • LevelSets
  • Paramdigma.Core.Exceptions
    • UnsetGeometryException
  • Paramdigma.Core.Extensions
    • Lists
  • Paramdigma.Core.Geometry
    • BaseCurve
    • BasePoint
    • Box
    • Circle
    • Cylinder
    • Delaunay
    • InvalidCurveException
    • Line
    • Line2d
    • Mesh
    • MeshCorner
    • MeshEdge
    • MeshFace
    • MeshGeometry
    • MeshHalfEdge
    • MeshPoint
    • MeshTopology
    • MeshVertex
    • NurbsCurve
    • NurbsSurface
    • Plane
    • Point2d
    • Point3d
    • Point4d
    • Polyline
    • Polyline2d
    • Ray
    • Ray2d
    • Rectangle2d
    • Sphere
    • Torus
    • Vector2d
    • Vector3d
    • VectorNd
  • Paramdigma.Core.Geometry.Interfaces
    • ICurve
    • ISurface
    • IVector
  • Paramdigma.Core.IO
    • CsvReader
    • CsvWritter
    • OBJMeshData
    • ObjReader
    • ObjWritter
    • OffMeshData
    • OffReader
    • OffResult
    • OffWriter
  • Paramdigma.Core.LinearAlgebra
    • Complex
    • LeastSquaresLinearFit
    • Triplet
    • TripletData
  • Paramdigma.Core.Optimization
    • GradientDescent
    • GradientDescent.FitnessFunction
    • GradientDescentOptions
    • GradientDescentResult
    • KMeansCluster
    • KMeansClustering
    • KMeansClustering.IterationCompletedEventArgs
  • Paramdigma.Core.Spatial
    • DelaunayEdge
    • DelaunayPoint
    • DelaunayTriangle
    • Octree
    • PointCloud
    • PointCloudMember
    • QuadTree

Class Rectangle2d

Represents a 2D bounding box.

Inheritance
System.Object
Rectangle2d
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Rectangle2d : object

Constructors

| Improve this Doc View Source

Rectangle2d(Point2d, Point2d)

Initializes a new instance of the Rectangle2d class from 2 points. Coordinates will automatically be corrected if the corners are not consistent with naming (i.e. bottomLeftCorner is actually topLeft..)

Declaration
public Rectangle2d(Point2d bottomLeftCorner, Point2d topRightCorner)
Parameters
Type Name Description
Point2d bottomLeftCorner

Bottom left corner.

Point2d topRightCorner

Top right corner.

| Improve this Doc View Source

Rectangle2d(Polyline2d)

Initializes a new instance of the Rectangle2d class from a polyline.

Declaration
public Rectangle2d(Polyline2d polyline)
Parameters
Type Name Description
Polyline2d polyline

Polyline.

Properties

| Improve this Doc View Source

BottomLeft

Gets the Bottom left corner of the BBox.

Declaration
public Point2d BottomLeft { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

BottomRight

Gets the Bottom right corner of the BBox.

Declaration
public Point2d BottomRight { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

Center

Gets the center of the bounding BBox.

Declaration
public Point2d Center { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

MidBottom

Gets the midpoint at the bottom edge of the box.

Declaration
public Point2d MidBottom { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

MidLeft

Gets the midpoint at the left edge of the box.

Declaration
public Point2d MidLeft { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

MidRight

Gets the midpoint at the right edge of the box.

Declaration
public Point2d MidRight { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

MidTop

Gets the midpoint at the top edge of the box.

Declaration
public Point2d MidTop { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

TopLeft

Gets the top left corner of the BBox.

Declaration
public Point2d TopLeft { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

TopRight

Gets the top right corner of the BBox.

Declaration
public Point2d TopRight { get; }
Property Value
Type Description
Point2d
| Improve this Doc View Source

XDomain

Gets or sets the Domain in the X direction.

Declaration
public Interval XDomain { get; set; }
Property Value
Type Description
Interval
| Improve this Doc View Source

YDomain

Gets or sets the Domain in the Y direction.

Declaration
public Interval YDomain { get; set; }
Property Value
Type Description
Interval

Methods

| Improve this Doc View Source

ContainsPoint(Point2d)

Checks if a point is contained inside the box.

Declaration
public bool ContainsPoint(Point2d pt)
Parameters
Type Name Description
Point2d pt

Point to test containment.

Returns
Type Description
System.Boolean

True if point is contained inside the bounding box.

| Improve this Doc View Source

IntersectsBox(Rectangle2d)

Checks if a box intersects with this instance.

Declaration
public bool IntersectsBox(Rectangle2d box)
Parameters
Type Name Description
Rectangle2d box

Box to check intersection against.

Returns
Type Description
System.Boolean

True if intersection exists.

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
  • Improve this Doc
  • View Source
Back to top Generated by DocFX