Isle
Loading...
Searching...
No Matches
MxRect16 Class Reference

[AI] Rectangle using 16-bit signed integer coordinates. More...

#include <mxgeometry.h>

Inheritance diagram for MxRect16:
Collaboration diagram for MxRect16:

Public Member Functions

 MxRect16 ()
 [AI] Default constructor. More...
 
 MxRect16 (const MxRect16 &p_r)
 [AI] Copy constructor. More...
 
 MxRect16 (MxS16 p_l, MxS16 p_t, MxS16 p_r, MxS16 p_b)
 [AI] Constructor from coordinates. More...
 
 MxRect16 (MxPoint16 &p_p, MxSize16 &p_s)
 [AI] Construct a rectangle from point and size. More...
 
- Public Member Functions inherited from MxRect< MxS16 >
 MxRect ()
 [AI] Default constructor, does not initialize rectangle. More...
 
 MxRect (const MxRect &p_r)
 [AI] Copy constructor. More...
 
 MxRect (MxS16 p_l, MxS16 p_t, MxS16 p_r, MxS16 p_b)
 [AI] Construct from coordinates. More...
 
 MxRect (const MxPoint< MxS16 > &p_p, const MxSize< MxS16 > &p_s)
 [AI] Construct from point and size. More...
 
MxS16 GetLeft () const
 [AI] Get the left edge. More...
 
void SetLeft (MxS16 p_left)
 [AI] Set the left edge. More...
 
MxS16 GetTop () const
 [AI] Get the top edge. More...
 
void SetTop (MxS16 p_top)
 [AI] Set the top edge. More...
 
MxS16 GetRight () const
 [AI] Get the right edge. More...
 
void SetRight (MxS16 p_right)
 [AI] Set the right edge. More...
 
MxS16 GetBottom () const
 [AI] Get the bottom edge. More...
 
void SetBottom (MxS16 p_bottom)
 [AI] Set the bottom edge. More...
 
MxS16 GetWidth () const
 [AI] Get the rectangle's width. More...
 
MxS16 GetHeight () const
 [AI] Get the rectangle's height. More...
 
MxPoint< MxS16GetLT () const
 [AI] Get the top-left point of the rectangle. More...
 
MxPoint< MxS16GetRB () const
 [AI] Get the bottom-right point of the rectangle. More...
 
MxBool Empty () const
 [AI] Returns whether the rectangle is empty or not. More...
 
MxBool Contains (const MxPoint< MxS16 > &p_p) const
 [AI] Test whether a point is inside the rectangle (inclusive). More...
 
MxBool Intersects (const MxRect &p_r) const
 [AI] Returns whether this rectangle intersects another. More...
 
void operator= (const MxRect &p_r)
 [AI] Assignment operator. More...
 
MxBool operator== (const MxRect &p_r) const
 [AI] Equality operator. More...
 
MxBool operator!= (const MxRect &p_r) const
 [AI] Inequality operator. More...
 
void operator+= (const MxPoint< MxS16 > &p_p)
 [AI] Translate the rectangle by a point, in-place. More...
 
void operator-= (const MxPoint< MxS16 > &p_p)
 [AI] Translate the rectangle by the negative of a point, in-place. More...
 
void operator&= (const MxRect &p_r)
 [AI] Intersect rectangle in-place with another. More...
 
void operator|= (const MxRect &p_r)
 [AI] Unites this rectangle with another in-place. More...
 
MxRect operator+ (const MxPoint< MxS16 > &p_p) const
 [AI] Returns a translated rectangle. More...
 
MxRect operator- (const MxPoint< MxS16 > &p_p) const
 [AI] Returns a translated rectangle (by negative). More...
 
MxRect operator& (const MxRect &p_r) const
 [AI] Returns the intersection of this rectangle and another. More...
 
MxRect operator| (const MxRect &p_r) const
 [AI] Returns the bounding rectangle (union) of this and another. More...
 

Additional Inherited Members

- Protected Attributes inherited from MxRect< MxS16 >
MxS16 m_left
 [AI] Left edge (minimum x). More...
 
MxS16 m_top
 [AI] Top edge (minimum y). More...
 
MxS16 m_right
 [AI] Right edge (maximum x). More...
 
MxS16 m_bottom
 [AI] Bottom edge (maximum y). More...
 

Detailed Description

[AI] Rectangle using 16-bit signed integer coordinates.

[AI] Represents a rectangle suitable for UI or grid spaces with 16-bit range.

Definition at line 646 of file mxgeometry.h.

Constructor & Destructor Documentation

◆ MxRect16() [1/4]

MxRect16::MxRect16 ( )
inline

[AI] Default constructor.

Definition at line 651 of file mxgeometry.h.

◆ MxRect16() [2/4]

MxRect16::MxRect16 ( const MxRect16 p_r)
inline

[AI] Copy constructor.

Parameters
p_r[AI] Rectangle to copy.

Definition at line 657 of file mxgeometry.h.

◆ MxRect16() [3/4]

MxRect16::MxRect16 ( MxS16  p_l,
MxS16  p_t,
MxS16  p_r,
MxS16  p_b 
)
inline

[AI] Constructor from coordinates.

Parameters
p_l[AI] Left coordinate.
p_t[AI] Top coordinate.
p_r[AI] Right coordinate.
p_b[AI] Bottom coordinate.

Definition at line 666 of file mxgeometry.h.

◆ MxRect16() [4/4]

MxRect16::MxRect16 ( MxPoint16 p_p,
MxSize16 p_s 
)
inline

[AI] Construct a rectangle from point and size.

Parameters
p_p[AI] Point (top-left).
p_s[AI] Size.

Definition at line 673 of file mxgeometry.h.


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