Logo Euclid

BRect Type

A struct of 4 floats representing 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
   ^
   |
   |             2 max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-Axis
  0-min X,Y      1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Record fields

Record Field Description

MaxX

Full Usage: MaxX

Field type: float

The fields holding the maximum X value of this bounding rectangle.

Field type: float

MaxY

Full Usage: MaxY

Field type: float

The fields holding the maximum Y value of this bounding rectangle.

Field type: float

MinX

Full Usage: MinX

Field type: float

The fields holding the minimum X value of this bounding rectangle.

Field type: float

MinY

Full Usage: MinY

Field type: float

The fields holding the minimum Y value of this bounding rectangle.

Field type: float

Instance members

Instance member Description

this.Area

Full Usage: this.Area

Returns: float
Modifiers: inline

Returns the area of this bounding rectangle.

Returns: float

this.AsFSharpCode

Full Usage: this.AsFSharpCode

Returns: string

Format bounding rectangle into an F# code string that can be used to recreate the rectangle.

Returns: string

this.AsString

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()

Returns: string

this.Center

Full Usage: this.Center

Returns: Pt
Modifiers: inline

The center of the bounding rect.

Returns: Pt

this.Contains

Full Usage: this.Contains

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the Rectangle is inside or exactly on the other bounding rectangle.

o : BRect
Returns: bool

this.ContainsPt

Full Usage: this.ContainsPt

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the point is inside or exactly on this bounding rectangle.

p : Pt
Returns: bool

this.ContainsXY

Full Usage: this.ContainsXY

Parameters:
    x : float
    y : float

Returns: bool
Modifiers: inline

Returns TRUE if the point is inside or exactly on this bounding rectangle.

x : float
y : float
Returns: bool

this.CountZeroSides

Full Usage: this.CountZeroSides

Returns: int
Modifiers: inline

Counts the amount of sides that are smaller than the zeroLength tolerance. This is 0, 1, or 2.

Returns: int

this.Diagonal

Full Usage: this.Diagonal

Returns: Vc
Modifiers: inline

The diagonal 2D vector of the bounding rect. From MinPt to MaxPt.

Returns: Vc

this.Edge01

Full Usage: this.Edge01

Returns: Line2D

The bottom edge. The line from point 0 to 1.

   Y-Axis
   ^
   |
   |             2  = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y    1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Line2D

this.Edge12

Full Usage: this.Edge12

Returns: Line2D

The right edge. The line from point 1 to 2.

   Y-Axis
   ^
   |
   |             2  = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y    1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Line2D

this.Edge23

Full Usage: this.Edge23

Returns: Line2D

The top edge. The line from point 2 to 3.

   Y-Axis
   ^
   |
   |             2  = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y    1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Line2D

this.Edge30

Full Usage: this.Edge30

Returns: Line2D

The left edge. The line from point 3 to 0.

   Y-Axis
   ^
   |
   |             2  = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y    1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Line2D

this.EvaluateAt

Full Usage: this.EvaluateAt

Parameters:
    xParameter : float
    yParameter : float

Returns: Pt
Modifiers: inline
 Evaluate a X and Y parameter of this bounding rectangle.
  0.0, 0.0 returns the MinPt.
  1.0, 1.0 returns the MaxPt.
xParameter : float
yParameter : float
Returns: Pt

this.Expand

Full Usage: this.Expand

Parameters:
    dist : float

Returns: BRect
Modifiers: inline

Returns a bounding rectangle expanded by distance. Does check for underflow if distance is negative and raises EuclidException.

dist : float
Returns: BRect

this.ExpandSafe

Full Usage: this.ExpandSafe

Parameters:
    dist : float

Returns: BRect
Modifiers: inline

Returns a bounding rectangle expanded by a distance. If expansion is negative it shrinks the Rectangle. It also prevents the rectangle from collapsing past its center. When the negative expansion is bigger than the size, Min and Max values will be both at the center point.

dist : float
Returns: BRect

this.ExpandSafeXY

Full Usage: this.ExpandSafeXY

Parameters:
    xDist : float
    yDist : float

Returns: BRect

Returns a bounding rectangle expanded by a distance for X and Y-axis each. If expansion is negative it shrinks the Rectangle. It also prevents the rectangle from collapsing past its center. When the negative expansion is bigger than the size, Min and Max values will be both at the center point.

xDist : float
yDist : float
Returns: BRect

this.ExpandXY

Full Usage: this.ExpandXY

Parameters:
    xDist : float
    yDist : float

Returns: BRect
Modifiers: inline

Returns a bounding rectangle expanded by a distance for X and Y-axis each. Raises EuclidException if the resulting rectangle would be invalid (Min > Max).

xDist : float
yDist : float
Returns: BRect

this.ExpandXaxis

Full Usage: this.ExpandXaxis

Parameters:
    startDist : float
    endDist : float

Returns: BRect
Modifiers: inline

Returns a bounding rectangle expanded only in X direction by different distances for start(minX) and end (maxX). Does check for underflow if distance is negative and raises EuclidException.

startDist : float
endDist : float
Returns: BRect

this.ExpandYaxis

Full Usage: this.ExpandYaxis

Parameters:
    startDist : float
    endDist : float

Returns: BRect
Modifiers: inline

Returns a bounding rectangle expanded only in Y direction by different distances for start(minY) and end (maxY). Does check for underflow if distance is negative and raises EuclidException.

startDist : float
endDist : float
Returns: BRect

this.HasArea

Full Usage: this.HasArea

Returns: bool
Modifiers: inline

Tests if none of the X and Y axis is smaller than the zeroLength tolerance. Same as .IsValid

Returns: bool

this.Intersection

Full Usage: this.Intersection

Parameters:
Returns: BRect voption
Modifiers: inline

Returns the intersection of two bounding rectangles. The returned Rectangle is the area that is inside both input Rectangles. Returns ValueNone if the two Rectangles do not overlap. Just touching Rectangles will return ValueSome with zero area collapsed BRect.

a : BRect
Returns: BRect voption

this.IsLine

Full Usage: this.IsLine

Returns: bool
Modifiers: inline

Tests if one of the X or Y axis is smaller than the zeroLength tolerance.

Returns: bool

this.IsOverlapping

Full Usage: this.IsOverlapping

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the two 2D bounding rectangles do overlap or touch exactly. Also returns TRUE if one box is completely inside the other. Also returns TRUE if one box is completely surrounding the other.

a : BRect
Returns: bool

this.IsOverlappingOrClose

Full Usage: this.IsOverlappingOrClose

Parameters:
    a : BRect
    tolerance : float

Returns: bool
Modifiers: inline

Returns TRUE if the two 2D bounding rectangles do overlap or are apart less than the specified tolerance. Also returns TRUE if one box is completely inside the other. Also returns TRUE if one box is completely surrounding the other. A negative tolerance shrinks the effective boundaries instead of expanding them. The math works out symmetrically:

a : BRect
tolerance : float
Returns: bool

this.IsPoint

Full Usage: this.IsPoint

Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsZero.

Returns: bool

this.IsTouching

Full Usage: this.IsTouching

Parameters:
    other : BRect
    ?tolerance : float

Returns: bool
Modifiers: inline

Returns TRUE if the two 2D bounding rectangles are just touching within the tolerance. The default tolerance is 1e-6.But can also be specified as a parameter. Returns FALSE if one box is completely inside the other. Returns FALSE if one box is completely surrounding the other.

other : BRect
?tolerance : float
Returns: bool

this.IsValid

Full Usage: this.IsValid

Returns: bool
Modifiers: inline

Tests if no sides of the X and Y axis is smaller than the zeroLength tolerance. Same as .HasArea

Returns: bool

this.IsZero

Full Usage: this.IsZero

Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsPoint.

Returns: bool

this.LongestEdge

Full Usage: this.LongestEdge

Returns: float
Modifiers: inline

Returns the longest edge of the Box.

Returns: float

this.MaxPt

Full Usage: this.MaxPt

Returns: Pt
Modifiers: inline

The point where X and Y are the maximum values.

Returns: Pt

this.MinPt

Full Usage: this.MinPt

Returns: Pt
Modifiers: inline

The point where X and Y are the minimum values.

Returns: Pt

this.Points

Full Usage: this.Points

Returns: Pt[]

Returns the corners of this bounding rectangle in Counter-Clockwise order, starting at MinPt. Returns an array of 4 Points.

   Y-Axis
   ^
   |
   |             2  = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y    1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Pt[]

this.PointsLooped

Full Usage: this.PointsLooped

Returns: Pt[]

Returns a Counter-Clockwise array of 5 Points, starting at MinPt. Last and first point are the same.

   Y-Axis
   ^
   |
   |             2  = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y    1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Pt[]

this.Pt0

Full Usage: this.Pt0

Returns: Pt

Returns the point (0) or minX, minY.

   Y-Axis
   ^
   |
   |             2 = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y      1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Pt

this.Pt1

Full Usage: this.Pt1

Returns: Pt

Returns the point (1) or maxX, minY.

   Y-Axis
   ^
   |
   |             2 = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y      1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Pt

this.Pt2

Full Usage: this.Pt2

Returns: Pt

Returns the point (2) or maxX, maxY.

   Y-Axis
   ^
   |
   |             2 = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y      1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Pt

this.Pt3

Full Usage: this.Pt3

Returns: Pt

Returns the point (3) or minX, maxY.

   Y-Axis
   ^
   |
   |             2 = max X,Y
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |
   +------------+-----> X-Axis
  0 = min X,Y      1
val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
val min: e1: 'T -> e2: 'T -> 'T (requires comparison)

Returns: Pt

this.ShortestEdge

Full Usage: this.ShortestEdge

Returns: float
Modifiers: inline

Returns the shortest edge of the Box.

Returns: float

this.SizeX

Full Usage: this.SizeX

Returns: float
Modifiers: inline

The size in X direction.

Returns: float

this.SizeY

Full Usage: this.SizeY

Returns: float
Modifiers: inline

The size in Y direction.

Returns: float

this.TouchingSide

Full Usage: this.TouchingSide

Parameters:
    other : BRect
    ?tolerance : float

Returns: int
Modifiers: inline
 Returns a value from -1 to 6 indicating the side on which the two 2D
 are just touching within the tolerance.
 The default tolerance is 1e-6.But can also be specified as a parameter.
   -1 : not touching but overlapping / one inside the other
    0 : not touching, apart on at least one axis by more than tolerance
    1 : other is in front  of this (this.MinX touches other.MaxX)
    2 : other is behind    this  (this.MaxX touches other.MinX)
    3 : other is to the left  of this (this.MinY touches other.MaxY)
    4 : other is to the right of this (this.MaxY touches other.MinY)
    5 : this.MinZ touches other.MaxZ
    6 : this.MaxZ touches other.MinZ
other : BRect
?tolerance : float
Returns: int

this.Union

Full Usage: this.Union

Parameters:
Returns: BRect
Modifiers: inline

Returns a bounding rectangle that contains both input Rectangles.

b : BRect
Returns: BRect

this.UnionPt

Full Usage: this.UnionPt

Parameters:
Returns: BRect
Modifiers: inline

Returns a bounding rectangle that contains the input Rectangles and the point.

p : Pt
Returns: BRect

Static members

Static member Description

BRect.area r

Full Usage: BRect.area r

Parameters:
Returns: float
Modifiers: inline

Returns the area of this bounding rectangle.

r : BRect
Returns: float

BRect.asFSharpCode r

Full Usage: BRect.asFSharpCode r

Parameters:
Returns: string
Modifiers: inline

Format bounding rectangle into an F# code string that can be used to recreate the rectangle.

r : BRect
Returns: string

BRect.asString r

Full Usage: BRect.asString r

Parameters:
Returns: string
Modifiers: inline

Format bounding rectangle into string with nice floating point number formatting of size and position. But without full type name as in rect.ToString()

r : BRect
Returns: string

BRect.center r

Full Usage: BRect.center r

Parameters:
Returns: Pt
Modifiers: inline

The center of the bounding rect.

r : BRect
Returns: Pt

BRect.contains rectInside surroundingRect

Full Usage: BRect.contains rectInside surroundingRect

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if this bounding rectangle is inside or exactly on the other bounding rectangle. Argument order matters!

rectInside : BRect
surroundingRect : BRect
Returns: bool

BRect.containsPt pt rect

Full Usage: BRect.containsPt pt rect

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the point is inside or on this bounding rectangle.

pt : Pt
rect : BRect
Returns: bool

BRect.containsXY x y rect

Full Usage: BRect.containsXY x y rect

Parameters:
    x : float
    y : float
    rect : BRect

Returns: bool
Modifiers: inline

Returns TRUE if the point is inside or on this bounding rectangle.

x : float
y : float
rect : BRect
Returns: bool

BRect.countZeroSides r

Full Usage: BRect.countZeroSides r

Parameters:
Returns: int
Modifiers: inline

Counts the amount of sides that are smaller than the zeroLength tolerance. This is 0, 1, or 2.

r : BRect
Returns: int

BRect.create (a, b)

Full Usage: BRect.create (a, b)

Parameters:
Returns: BRect
Modifiers: inline

Finds min and max values for x and y.

a : Pt
b : Pt
Returns: BRect

BRect.createFromCenter (center, sizeX, sizeY)

Full Usage: BRect.createFromCenter (center, sizeX, sizeY)

Parameters:
    center : Pt
    sizeX : float
    sizeY : float

Returns: BRect
Modifiers: inline

Creates a bounding rectangle from a center point and the total X and Y size. Fails if sizeX or sizeY is negative.

center : Pt
sizeX : float
sizeY : float
Returns: BRect

BRect.createFromIList ps

Full Usage: BRect.createFromIList ps

Parameters:
Returns: BRect
Modifiers: inline

Finds min and max values for x and y. Fails if the IList is null or empty.

ps : IList<Pt>
Returns: BRect

BRect.createFromLine l

Full Usage: BRect.createFromLine l

Parameters:
Returns: BRect
Modifiers: inline

Creates a bounding rectangle of a line.

l : Line2D
Returns: BRect

BRect.createFromSeq ps

Full Usage: BRect.createFromSeq ps

Parameters:
    ps : Pt seq

Returns: BRect
Modifiers: inline

Finds min and max values for x and y. Fails if the sequence is null or empty.

ps : Pt seq
Returns: BRect

BRect.createUnchecked (minX, minY, maxX, maxY)

Full Usage: BRect.createUnchecked (minX, minY, maxX, maxY)

Parameters:
    minX : float
    minY : float
    maxX : float
    maxY : float

Returns: BRect
Modifiers: inline

Does not verify the order of min and max values. Creates a new bounding rectangle.

minX : float
minY : float
maxX : float
maxY : float
Returns: BRect

BRect.createXY (ptAx, ptAy, ptBx, ptBy)

Full Usage: BRect.createXY (ptAx, ptAy, ptBx, ptBy)

Parameters:
    ptAx : float - X value of point A
    ptAy : float - Y value of point A
    ptBx : float - X value of point B
    ptBy : float - Y value of point B

Returns: BRect A bounding rectangle that contains both points A and B.
Modifiers: inline

Finds min and max values points A and B given as separate X and Y values.

ptAx : float

X value of point A

ptAy : float

Y value of point A

ptBx : float

X value of point B

ptBy : float

Y value of point B

Returns: BRect

A bounding rectangle that contains both points A and B.

BRect.diagonal r

Full Usage: BRect.diagonal r

Parameters:
Returns: Vc
Modifiers: inline

The diagonal 2D vector of the bounding rect. From MinPt to MaxPt.

r : BRect
Returns: Vc

BRect.edge01 r

Full Usage: BRect.edge01 r

Parameters:
Returns: Line2D
Modifiers: inline

The bottom edge. The line from point 0 to 1.

r : BRect
Returns: Line2D

BRect.edge12 r

Full Usage: BRect.edge12 r

Parameters:
Returns: Line2D
Modifiers: inline

The right edge. The line from point 1 to 2.

r : BRect
Returns: Line2D

BRect.edge23 r

Full Usage: BRect.edge23 r

Parameters:
Returns: Line2D
Modifiers: inline

The top edge. The line from point 2 to 3.

r : BRect
Returns: Line2D

BRect.edge30 r

Full Usage: BRect.edge30 r

Parameters:
Returns: Line2D
Modifiers: inline

The left edge. The line from point 3 to 0.

r : BRect
Returns: Line2D

BRect.equals tol a b

Full Usage: BRect.equals tol a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 2D bounding rectangles are equal within tolerance. Use a tolerance of 0.0 to check for an exact match.

tol : float
a : BRect
b : BRect
Returns: bool

BRect.evaluateAt xParameter yParameter r

Full Usage: BRect.evaluateAt xParameter yParameter r

Parameters:
    xParameter : float
    yParameter : float
    r : BRect

Returns: Pt
Modifiers: inline

Evaluate a X and Y parameter of this bounding rectangle. 0.0, 0.0 returns the MinPt. 1.0, 1.0 returns the MaxPt.

xParameter : float
yParameter : float
r : BRect
Returns: Pt

BRect.expand dist r

Full Usage: BRect.expand dist r

Parameters:
Returns: BRect
Modifiers: inline

Returns bounding rectangle expanded by distance. Does check for underflow if distance is negative and raises EuclidException.

dist : float
r : BRect
Returns: BRect

BRect.expandRel factor r

Full Usage: BRect.expandRel factor r

Parameters:
    factor : float
    r : BRect

Returns: BRect

Returns the 2D bounding rectangle expanded by a relative factor on all four sides. Values between 0.0 and 1.0 shrink the rectangle. Values larger than 1.0 expand the rectangle. Does check for underflow if factor is negative and raises EuclidException.

factor : float
r : BRect
Returns: BRect

BRect.expandRelXY factorX factorY r

Full Usage: BRect.expandRelXY factorX factorY r

Parameters:
    factorX : float
    factorY : float
    r : BRect

Returns: BRect

Returns the 2D bounding rectangle expanded by a relative factor on all four sides, separately for X and Y. Values between 0.0 and 1.0 shrink the rectangle. Values larger than 1.0 expand the rectangle. Does check for underflow if any factor is negative and raises EuclidException.

factorX : float
factorY : float
r : BRect
Returns: BRect

BRect.expandSafe dist r

Full Usage: BRect.expandSafe dist r

Parameters:
Returns: BRect
Modifiers: inline

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.

dist : float
r : BRect
Returns: BRect

BRect.expandSafeXY xDist yDist r

Full Usage: BRect.expandSafeXY xDist yDist r

Parameters:
    xDist : float
    yDist : float
    r : BRect

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 prevents the rectangle from collapsing past its center. When the negative expansion is bigger than the size, Min and Max values will be both at the center point.

xDist : float
yDist : float
r : BRect
Returns: BRect

BRect.expandXY xDist yDist r

Full Usage: BRect.expandXY xDist yDist r

Parameters:
    xDist : float
    yDist : float
    r : BRect

Returns: BRect
Modifiers: inline

Returns a bounding rectangle expanded by a distance for X and Y-axis each.

xDist : float
yDist : float
r : BRect
Returns: BRect

BRect.expandXaxis startDist endDist r

Full Usage: BRect.expandXaxis startDist endDist r

Parameters:
    startDist : float
    endDist : float
    r : BRect

Returns: BRect
Modifiers: inline

Returns bounding rectangle expanded only in X direction by different distances for start(minX) and end (maxX). Does check for underflow if distance is negative and raises EuclidException.

startDist : float
endDist : float
r : BRect
Returns: BRect

BRect.expandYaxis startDist endDist r

Full Usage: BRect.expandYaxis startDist endDist r

Parameters:
    startDist : float
    endDist : float
    r : BRect

Returns: BRect
Modifiers: inline

Returns bounding rectangle expanded only in Y direction by different distances for start(minY) and end (maxY). Does check for underflow if distance is negative and raises EuclidException.

startDist : float
endDist : float
r : BRect
Returns: BRect

BRect.hasArea r

Full Usage: BRect.hasArea r

Parameters:
Returns: bool
Modifiers: inline

Tests if none of the X and Y axis is smaller than the zeroLength tolerance. Same as .IsValid.

r : BRect
Returns: bool

BRect.intersection a b

Full Usage: BRect.intersection a b

Parameters:
Returns: BRect voption
Modifiers: inline

Returns the intersection of two bounding rectangles. The returned Rectangle is the area that is inside both input Rectangles. Returns ValueNone if the two Rectangles do not overlap. Just touching Rectangles will return ValueSome with zero area collapsed BRect.

a : BRect
b : BRect
Returns: BRect voption

BRect.isLine r

Full Usage: BRect.isLine r

Parameters:
Returns: bool
Modifiers: inline

Tests if one of the X or Y axis is smaller than the zeroLength tolerance.

r : BRect
Returns: bool

BRect.isOverlapping a b

Full Usage: BRect.isOverlapping a b

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the two 2D bounding rectangles do overlap or touch exactly. Also returns TRUE if one box is completely inside the other. Also returns TRUE if one box is completely surrounding the other.

a : BRect
b : BRect
Returns: bool

BRect.isOverlappingOrClose tolerance a b

Full Usage: BRect.isOverlappingOrClose tolerance a b

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the two 2D bounding rectangles do overlap or are apart less than the specified tolerance. Also returns TRUE if one box is completely inside the other. Also returns TRUE if one box is completely surrounding the other. A negative tolerance shrinks the effective boundaries instead of expanding them. The math works out symmetrically:

tolerance : float
a : BRect
b : BRect
Returns: bool

BRect.isPoint r

Full Usage: BRect.isPoint r

Parameters:
Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsZero.

r : BRect
Returns: bool

BRect.isTouching tolerance other this

Full Usage: BRect.isTouching tolerance other this

Parameters:
Returns: bool
Modifiers: inline

Returns TRUE if the two 2D bounding rectangles are just touching within a given specified tolerance. Returns FALSE if one box is completely inside the other. Returns FALSE if one box is completely surrounding the other.

tolerance : float
other : BRect
this : BRect
Returns: bool

BRect.isValid r

Full Usage: BRect.isValid r

Parameters:
Returns: bool
Modifiers: inline

Tests if no sides of the X and Y axis is smaller than the zeroLength tolerance. Same as .HasArea.

r : BRect
Returns: bool

BRect.isZero r

Full Usage: BRect.isZero r

Parameters:
Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsPoint.

r : BRect
Returns: bool

BRect.longestEdge r

Full Usage: BRect.longestEdge r

Parameters:
Returns: float
Modifiers: inline

Returns the longest edge of the Box.

r : BRect
Returns: float

BRect.maxPt r

Full Usage: BRect.maxPt r

Parameters:
Returns: Pt
Modifiers: inline

The point where X and Y are the maximum values.

r : BRect
Returns: Pt

BRect.minPt r

Full Usage: BRect.minPt r

Parameters:
Returns: Pt
Modifiers: inline

The point where X and Y are the minimum values.

r : BRect
Returns: Pt

BRect.move v r

Full Usage: BRect.move v r

Parameters:
Returns: BRect
Modifiers: inline

Returns a new 2D-bounding-rectangle moved by a vector. This is the same as translate.

v : Vc
r : BRect
Returns: BRect

BRect.moveX translation r

Full Usage: BRect.moveX translation r

Parameters:
    translation : float
    r : BRect

Returns: BRect
Modifiers: inline

Returns a new 2D-bounding-rectangle moved in X-axis direction.

translation : float
r : BRect
Returns: BRect

BRect.moveY translation r

Full Usage: BRect.moveY translation r

Parameters:
    translation : float
    r : BRect

Returns: BRect
Modifiers: inline

Returns a new 2D-bounding-rectangle moved in Y-axis direction.

translation : float
r : BRect
Returns: BRect

BRect.notEquals tol a b

Full Usage: BRect.notEquals tol a b

Parameters:
Returns: bool
Modifiers: inline

Check if two 2D bounding rectangles are not equal within a given tolerance. Use a tolerance of 0.0 to check if the two 2D bounding rectangles are not exactly equal.

tol : float
a : BRect
b : BRect
Returns: bool

BRect.points r

Full Usage: BRect.points r

Parameters:
Returns: Pt[]
Modifiers: inline

Returns the corners of this bounding rectangle in Counter-Clockwise order, starting at MinPt. Returns an array of 4 Points.

r : BRect
Returns: Pt[]

BRect.pointsLooped r

Full Usage: BRect.pointsLooped r

Parameters:
Returns: Pt[]
Modifiers: inline

Returns a Counter-Clockwise array of 5 Points, starting at MinPt. Last and first point are the same.

r : BRect
Returns: Pt[]

BRect.pt0 r

Full Usage: BRect.pt0 r

Parameters:
Returns: Pt
Modifiers: inline

Returns the point (0) or minX, minY.

r : BRect
Returns: Pt

BRect.pt1 r

Full Usage: BRect.pt1 r

Parameters:
Returns: Pt
Modifiers: inline

Returns the point (1) or maxX, minY.

r : BRect
Returns: Pt

BRect.pt2 r

Full Usage: BRect.pt2 r

Parameters:
Returns: Pt
Modifiers: inline

Returns the point (2) or maxX, maxY.

r : BRect
Returns: Pt

BRect.pt3 r

Full Usage: BRect.pt3 r

Parameters:
Returns: Pt
Modifiers: inline

Returns the point (3) or minX, maxY.

r : BRect
Returns: Pt

BRect.scale factor r

Full Usage: BRect.scale factor r

Parameters:
    factor : float
    r : BRect

Returns: BRect
Modifiers: inline

Scales the 2D bounding rectangle by a given factor. Scale center is World Origin 0,0. A factor of 0.0 will collapse the rectangle to a point at the origin. Negative factors would flip the rectangle, breaking the Min/Max invariant, so this is raising an EuclidException.

factor : float
r : BRect
Returns: BRect

BRect.shortestEdge r

Full Usage: BRect.shortestEdge r

Parameters:
Returns: float
Modifiers: inline

Returns the shortest edge of the Box.

r : BRect
Returns: float

BRect.sizeX r

Full Usage: BRect.sizeX r

Parameters:
Returns: float
Modifiers: inline

The size in X direction.

r : BRect
Returns: float

BRect.sizeY r

Full Usage: BRect.sizeY r

Parameters:
Returns: float
Modifiers: inline

The size in Y direction.

r : BRect
Returns: float

BRect.toString r

Full Usage: BRect.toString r

Parameters:
Returns: string
Modifiers: inline

Nicely formatted string representation of the bounding rectangle, including its size.

r : BRect
Returns: string

BRect.touchingSide other tolerance this

Full Usage: BRect.touchingSide other tolerance this

Parameters:
Returns: int
Modifiers: inline
 Returns a value from -1 to 6 indicating the side on which the two 2D
 are just touching within a given specified tolerance.
   -1 : not touching but overlapping / one inside the other
    0 : not touching, apart on at least one axis by more than tolerance
    1 : other is in front  of this (this.MinX touches other.MaxX)
    2 : other is behind    this  (this.MaxX touches other.MinX)
    3 : other is to the left  of this (this.MinY touches other.MaxY)
    4 : other is to the right of this (this.MaxY touches other.MinY)
    5 : this.MinZ touches other.MaxZ
    6 : this.MaxZ touches other.MinZ
other : BRect
tolerance : float
this : BRect
Returns: int

BRect.translate v r

Full Usage: BRect.translate v r

Parameters:
Returns: BRect
Modifiers: inline

Returns a new 2D-bounding-rectangle moved by a vector. This is the same as move.

v : Vc
r : BRect
Returns: BRect

BRect.union a b

Full Usage: BRect.union a b

Parameters:
Returns: BRect
Modifiers: inline

Returns a bounding rectangle that contains both input Rectangles.

a : BRect
b : BRect
Returns: BRect

BRect.unionPt p r

Full Usage: BRect.unionPt p r

Parameters:
Returns: BRect
Modifiers: inline

Returns a bounding rectangle that contains the input Rectangles and the point.

p : Pt
r : BRect
Returns: BRect

Type something to start searching.