BRect Type
An immutable 2D bounding rectangle. Sometimes also called 2D a bounding box. This implementation guarantees the rectangle to be always valid. That means the Min X and Y values are always smaller or equal than the respective Max values. Y-Axis (Height2D) ^ | | 2 max X,Y 3 +------------+ | | | | | | | | | | local +------------+-----> X-Axis (Width) 0-min X,Y 1
Record fields
Record Field |
Description
|
Full Usage:
MaxX
Field type: float
|
|
Full Usage:
MaxY
Field type: float
|
|
Full Usage:
MinX
Field type: float
|
|
Full Usage:
MinY
Field type: float
|
|
Instance members
Instance member |
Description
|
Full Usage:
this.Area
Returns: float
Modifiers: inline |
Returns the area of this bounding rectangle.
|
Full Usage:
this.AsString
Returns: string
|
Format bounding rectangle into string with nice floating point number formatting of size and position. But without full type name as in rect.ToString()
|
|
The center of the bounding rect.
|
|
Returns true if the Rectangle is inside or exactly on the other bounding rectangle.
|
|
|
|
The diagonal 2D vector of the bounding rect. From MinPt to MaxPt.
|
|
The bottom Edge. The line from point 0 to 1 Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
The right Edge. The line from point 1 to 2 Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
The top Edge. The line from point 2 to 3 Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
The left Edge. The line from point 3 to 0 Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
Full Usage:
this.EvaluateAt
Parameters:
float
yParameter : float
Returns: Pt
Modifiers: inline |
Evaluate a X and Y parameter of this bounding rectangle. 0.0, 0.0, 0.0 returns the MinPt. 1.0, 1.0, 1.0 returns the MaxPt.
|
|
Returns a bounding rectangle expanded by a distance for X and Y-axis each. Does check for underflow if distance is negative and raises EuclidException.
|
|
Returns a bounding rectangle expanded by distance. Does check for underflow if distance is negative and raises EuclidException.
|
|
Returns a bounding rectangle expanded by a distance. If expansion is negative it shrinks the Rectangle. It also makes sure that there is no underflow. When the negative expansion is bigger than the size, Min and Max values will be both in the middle from where they were before.
|
Full Usage:
this.ExpandSave
Parameters:
float
yDist : float
Returns: BRect
Modifiers: inline |
Returns a bounding rectangle expanded by a distance for X and Y-axis each. If expansion is negative it shrinks the Rectangle. It also makes sure that there is no underflow. When the negative expansion is bigger than the size, Min and Max values will be both in the middle from where they were before.
|
Full Usage:
this.ExpandXaxis
Parameters:
float
endDist : float
Returns: BRect
Modifiers: inline |
Returns a bounding rectangle expanded only in X direction by different distance for start(minX) and end (maxX). Does check for underflow if distance is negative and raises EuclidException.
|
Full Usage:
this.ExpandYaxis
Parameters:
float
endDist : float
Returns: BRect
Modifiers: inline |
Returns a bounding rectangle expanded only in Y direction by different distance for start(minY) and end (maxY). Does check for underflow if distance is negative and raises EuclidException.
|
Full Usage:
this.Height2D
Returns: float
Modifiers: inline |
The size in Y direction, same as member rect.SizeY.
|
|
|
|
Test if bounding rectangles are only touching each other from the Outside within a given tolerance.
|
|
The point where X, Y and Z are the maximum values.
|
|
The point where X, Y and Z are the minimum values.
|
|
Returns true if the two bounding rectangles do overlap more than a given tolerance distance. Use a negative tolerance to count touching if they are apart by abs(tolerance) Returns false if the two bounding rectangles are just touching or apart. Also returns true if one box is completely inside the other. Also returns true if one box is completely surrounding the other.
|
|
Returns true if the two bounding rectangles do overlap or touch. Also returns true if one box is completely inside the other. Also returns true if one box is completely surrounding the other.
|
|
Returns the corners of this bounding rectangle in Counter-Clockwise order, starting at MinPt. Returns an array of 4 Points. Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
Returns a Counter-Clockwise array of 5 Points, starting at MinPt. Last and first point are the same. Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
Returns the point (0) or minX, minY. Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
Returns the point (1) or maxX, minY. Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
Returns the point (2) or maxX, maxY. Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
Returns the point (3) or minX, maxY. Y-Axis (Height2D) ^ | | 2 = max X,Y 3 +------------+ | | | | | | | | | | +------------+-----> X-Axis (Width) 0 = min X,Y 1
|
|
Full Usage:
this.SizeX
Returns: float
Modifiers: inline |
The size in X direction, same as member rect.Width.
|
Full Usage:
this.SizeY
Returns: float
Modifiers: inline |
The size in Y direction, same as member rect.Height2D.
|
|
|
|
|
Full Usage:
this.Width
Returns: float
Modifiers: inline |
The size in X direction, same as member rect.SizeX.
|
Static members
Static member |
Description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BRect.createUnchecked (minX, minY, maxX, maxY)
Parameters:
float
minY : float
maxX : float
maxY : float
Returns: BRect
Modifiers: inline |
Does not verify the order of min and max values.
|
|
|
|
Returns true if the two bounding rectangles do overlap more than a given tolerance distance. Use a negative tolerance to count touching if they are apart by abs(tolerance) Returns false if the two bounding rectangles are just touching or apart. Also returns true if one box is completely inside the other. Also returns true if one box is completely surrounding the other.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|