Show / Hide Table of Contents

Class BoundingRectangle

Represents an axis aligned bounding rectangle.

Inheritance
System.Object
BoundingRectangle
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: netDxf
Assembly: CADability.dll
Syntax
public class BoundingRectangle

Constructors

| Improve this Doc View Source

BoundingRectangle(Vector2, Vector2)

Initializes a new axis aligned bounding rectangle.

Declaration
public BoundingRectangle(Vector2 min, Vector2 max)
Parameters
Type Name Description
Vector2 min

Lower-left corner.

Vector2 max

Upper-right corner.

| Improve this Doc View Source

BoundingRectangle(Vector2, Double)

Initializes a new axis aligned bounding rectangle from a circle.

Declaration
public BoundingRectangle(Vector2 center, double radius)
Parameters
Type Name Description
Vector2 center

Center of the bounding rectangle.

System.Double radius

Radius of the circle.

| Improve this Doc View Source

BoundingRectangle(Vector2, Double, Double)

Initializes a new axis aligned bounding rectangle.

Declaration
public BoundingRectangle(Vector2 center, double width, double height)
Parameters
Type Name Description
Vector2 center

Center of the bounding rectangle.

System.Double width

Width of the bounding rectangle.

System.Double height

Height of the bounding rectangle.

| Improve this Doc View Source

BoundingRectangle(Vector2, Double, Double, Double)

Initializes a new axis aligned bounding rectangle from a rotated ellipse.

Declaration
public BoundingRectangle(Vector2 center, double majorAxis, double minorAxis, double rotation)
Parameters
Type Name Description
Vector2 center

Center of the ellipse.

System.Double majorAxis

Major axis of the ellipse.

System.Double minorAxis

Minor axis of the ellipse.

System.Double rotation

Rotation in degrees of the ellipse.

| Improve this Doc View Source

BoundingRectangle(IEnumerable<Vector2>)

Initializes a new axis aligned bounding rectangle.

Declaration
public BoundingRectangle(IEnumerable<Vector2> points)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Vector2> points

A list of Vector2.

Properties

| Improve this Doc View Source

Center

Gets the bounding rectangle center.

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

Height

Gets the bounding rectangle height.

Declaration
public double Height { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Max

Gets or sets the bounding rectangle upper-right corner.

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

Min

Gets or sets the bounding rectangle lower-left corner.

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

Radius

Gets the radius of the circle that contains the bounding rectangle.

Declaration
public double Radius { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Width

Gets the bounding rectangle width.

Declaration
public double Width { get; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc View Source

PointInside(Vector2)

Checks if a point is inside the bounding rectangle.

Declaration
public bool PointInside(Vector2 point)
Parameters
Type Name Description
Vector2 point

Vector2 to check.

Returns
Type Description
System.Boolean

True if the point is inside the bounding rectangle, false otherwise.

| Improve this Doc View Source

Union(BoundingRectangle, BoundingRectangle)

Obtains the union between two bounding rectangles.

Declaration
public static BoundingRectangle Union(BoundingRectangle aabr1, BoundingRectangle aabr2)
Parameters
Type Name Description
BoundingRectangle aabr1

A bounding rectangle.

BoundingRectangle aabr2

A bounding rectangle.

Returns
Type Description
BoundingRectangle

The resulting bounding rectangle.

| Improve this Doc View Source

Union(IEnumerable<BoundingRectangle>)

Obtains the union of a bounding rectangles list .

Declaration
public static BoundingRectangle Union(IEnumerable<BoundingRectangle> rectangles)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<BoundingRectangle> rectangles

A list of bounding rectangles.

Returns
Type Description
BoundingRectangle

The resulting bounding rectangle.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX