Aurelon Open API 8.1.1
Loading...
Searching...
No Matches
AOI_Rectangle Class Reference

Rectangle. More...

Public Member Functions

 AOI_Rectangle ()
 
 AOI_Rectangle (float x1, float y1, float x2, float y2)
 
 AOI_Rectangle (const AOI_Rectangle &)
 
void Union (const AOI_Rectangle &)
 
bool Intersect (const AOI_Rectangle &)
 
bool CoordInBounds (const AOI_Point &) const
 
bool Overlaps (const AOI_Rectangle &) const
 
void TLtoBR ()
 

Detailed Description

Rectangle.

Definition at line 147 of file AOI_Types.h.

Constructor & Destructor Documentation

◆ AOI_Rectangle() [1/3]

AOI_Rectangle::AOI_Rectangle ( )

Constructs an empty rectangle. The initial values are positive infinity for the left top and negative infinity for the bottom right.

Definition at line 38 of file AOI_Types.cpp.

◆ AOI_Rectangle() [2/3]

AOI_Rectangle::AOI_Rectangle ( float x1,
float y1,
float x2,
float y2 )

Constructs a rectangle with given top/left and right/bottom

Parameters
x1left coordinate
y1top coordinate
x2right coordinate
y2bottom coordinate

Definition at line 52 of file AOI_Types.cpp.

◆ AOI_Rectangle() [3/3]

AOI_Rectangle::AOI_Rectangle ( const AOI_Rectangle & inBounds)

Constructs a copy of a rectangle.

Parameters
inBoundsSource rectangle to copy.

Definition at line 65 of file AOI_Types.cpp.

Member Function Documentation

◆ CoordInBounds()

bool AOI_Rectangle::CoordInBounds ( const AOI_Point & inCoord) const

Checks if the given coordinate/point is inside the rectangle.

Returns
True is the point is in the rectangle including the bounds itself.

Definition at line 117 of file AOI_Types.cpp.

◆ Intersect()

bool AOI_Rectangle::Intersect ( const AOI_Rectangle & inBounds)

Intersect this rectangles with the given rectangle. The result might be an empty rectangle (-inf, -inf, +inf, +inf) when the rectangles do not overlap.

Parameters
inBoundsRectangle to intersect with this rectangle
Returns
True is an intersection is found.

Definition at line 99 of file AOI_Types.cpp.

◆ Overlaps()

bool AOI_Rectangle::Overlaps ( const AOI_Rectangle & inBounds) const

Checks if the given rectangle intersects with this rectangle.

Returns
True is an intersection is found.

Definition at line 127 of file AOI_Types.cpp.

◆ TLtoBR()

void AOI_Rectangle::TLtoBR ( )

Corrects the coordinates in the rectangle so that they conform to (left,top)-(right,bottom). Allowing all usual combinations like (right,top)-(left,bottom) etc.

Definition at line 137 of file AOI_Types.cpp.

◆ Union()

void AOI_Rectangle::Union ( const AOI_Rectangle & inBounds)

Unions the rectangles to the rectangle that encloses both the rectangles.

Parameters
inBoundsRectangle to union with this rectangle

Definition at line 79 of file AOI_Types.cpp.


The documentation for this class was generated from the following files: