You are here: Start » AVL.NET » AVL.PointsBoundingRectangle(AvlNet.Point2D[], float?, AvlNet.BoundingRectangleFeature, AvlNet.Rectangle2D, AvlNet.Point2D, float, float)

AVL.PointsBoundingRectangle(AvlNet.Point2D[], float?, AvlNet.BoundingRectangleFeature, AvlNet.Rectangle2D, AvlNet.Point2D, float, float)

Computes the smallest rectangle containing an array of points.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void PointsBoundingRectangle(
	AvlNet.Point2D[] inPoints,
	float? inRectangleOrientation,
	AvlNet.BoundingRectangleFeature inBoundingRectangleFeature,
	out AvlNet.Rectangle2D outBoundingRectangle,
	out AvlNet.Point2D outCenter,
	out float outLongSide,
	out float outShortSide
)

Parameters

inPoints
Type: AvlNet.Point2D
Input array of points
inRectangleOrientation
Type: System.Nullable<System.Single>
Expected orientation of the resulting rectangle, or null.
inBoundingRectangleFeature
Type: AvlNet.BoundingRectangleFeature
Determines what kind of bounding rectangle will be computed
outBoundingRectangle
Type: AvlNet.Rectangle2D
Smallest bounding rectangle of the input points
outCenter
Type: AvlNet.Point2D
outLongSide
Type: System.Single
outShortSide
Type: System.Single

Examples

The resulting outBoundingRectangle drawn with the input points and with inRectangleOrientation set on Auto

Errors

Error type Description
DomainError No points on input in PointsBoundingRectangle.
DomainError Incorrect BoundingRectangleFeature in PointsBoundingRectangle.

See also