Defines a rectangular region defined by a point, height, width.
More...
#include <Region.h>
|
| | Region () |
| | Instantiates a new Region object.
|
| |
| | Region (const Point position, const Point size) |
| | Instantiates a new Region object.
|
| |
| | Region (const Point position, const int width, const int height) |
| | Instantiates a new Region object.
|
| |
| | Region (const int x, const int y, const int width, const int height) |
| | Instantiates a new Region object.
|
| |
| virtual | ~Region () |
| |
| void | Set (const int x, const int y, const int width, const int height) |
| | Sets the components of the region.
|
| |
| int | GetTop () |
| | The top of the region.
|
| |
| int | GetBottom () |
| | The bottom of the region.
|
| |
| int | GetLeft () |
| | The left side of the region.
|
| |
| int | GetRight () |
| | The right side of the region.
|
| |
| Point | GetTopLeft () |
| | The top left corner of the region.
|
| |
| Point | GetTopRight () |
| | The top right corner of the region.
|
| |
| Point | GetBottomLeft () |
| | The bottom left corner of the region.
|
| |
| Point | GetBottomRight () |
| | The bottom right corner of the region.
|
| |
| Vector2 | GetCenter () |
| | The center position of the region.
|
| |
| void | Translate (const int x, const int y) |
| | Moves the region by the specified amount.
|
| |
| void | Translate (const Point &point) |
| | Moves the region by the specified amount.
|
| |
|
| int | X = 0 |
| | The left side of the region.
|
| |
| int | Y = 0 |
| | The top of the region.
|
| |
| int | Width = 1 |
| | The width of the region.
|
| |
| int | Height = 1 |
| | The height of the region.
|
| |
Defines a rectangular region defined by a point, height, width.
Definition at line 20 of file Region.h.
◆ Region() [1/4]
| KatanaEngine::Region::Region |
( |
| ) |
|
|
inline |
◆ Region() [2/4]
| KatanaEngine::Region::Region |
( |
const Point | position, |
|
|
const Point | size ) |
|
inline |
Instantiates a new Region object.
- Parameters
-
| position | the upper left corner of the region. |
| size | The dimensions of the region. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 34 of file Region.h.
◆ Region() [3/4]
| KatanaEngine::Region::Region |
( |
const Point | position, |
|
|
const int | width, |
|
|
const int | height ) |
|
inline |
Instantiates a new Region object.
- Parameters
-
| position | the upper left corner of the region. |
| width | The width of the region. |
| height | The height of the region. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 43 of file Region.h.
◆ Region() [4/4]
| KatanaEngine::Region::Region |
( |
const int | x, |
|
|
const int | y, |
|
|
const int | width, |
|
|
const int | height ) |
|
inline |
Instantiates a new Region object.
- Parameters
-
| x | The left side of the region. |
| y | The top side of the region. |
| width | The width of the region. |
| height | The height of the region. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 53 of file Region.h.
◆ ~Region()
| virtual KatanaEngine::Region::~Region |
( |
| ) |
|
|
inlinevirtual |
◆ GetBottom()
| int KatanaEngine::Region::GetBottom |
( |
| ) |
|
|
inline |
The bottom of the region.
- Returns
- Returns the bottom.
Definition at line 81 of file Region.h.
◆ GetBottomLeft()
| Point KatanaEngine::Region::GetBottomLeft |
( |
| ) |
|
|
inline |
The bottom left corner of the region.
- Returns
- Returns the bottom left corner.
Definition at line 102 of file Region.h.
◆ GetBottomRight()
| Point KatanaEngine::Region::GetBottomRight |
( |
| ) |
|
|
inline |
The bottom right corner of the region.
- Returns
- Returns the bottom right corner.
Definition at line 106 of file Region.h.
◆ GetCenter()
| Vector2 KatanaEngine::Region::GetCenter |
( |
| ) |
|
|
inline |
The center position of the region.
- Returns
- Returns the center position.
Definition at line 110 of file Region.h.
◆ GetLeft()
| int KatanaEngine::Region::GetLeft |
( |
| ) |
|
|
inline |
The left side of the region.
- Returns
- Returns the left side.
Definition at line 85 of file Region.h.
◆ GetRight()
| int KatanaEngine::Region::GetRight |
( |
| ) |
|
|
inline |
The right side of the region.
- Returns
- Returns the right side.
Definition at line 89 of file Region.h.
◆ GetTop()
| int KatanaEngine::Region::GetTop |
( |
| ) |
|
|
inline |
The top of the region.
- Returns
- Returns the top.
Definition at line 77 of file Region.h.
◆ GetTopLeft()
| Point KatanaEngine::Region::GetTopLeft |
( |
| ) |
|
|
inline |
The top left corner of the region.
- Returns
- Returns the top left corner.
Definition at line 94 of file Region.h.
◆ GetTopRight()
| Point KatanaEngine::Region::GetTopRight |
( |
| ) |
|
|
inline |
The top right corner of the region.
- Returns
- Returns the top right corner.
Definition at line 98 of file Region.h.
◆ Set()
| void KatanaEngine::Region::Set |
( |
const int | x, |
|
|
const int | y, |
|
|
const int | width, |
|
|
const int | height ) |
|
inline |
Sets the components of the region.
- Parameters
-
| x | The left side of the region. |
| y | The top side of the region. |
| width | The width of the region. |
| height | The height of the region. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 67 of file Region.h.
◆ Translate() [1/2]
| void KatanaEngine::Region::Translate |
( |
const int | x, |
|
|
const int | y ) |
|
inline |
Moves the region by the specified amount.
- Parameters
-
| x | The amount to move the region on the x-axis. |
| y | The amount to move the region on the y-axis. |
Definition at line 115 of file Region.h.
◆ Translate() [2/2]
| void KatanaEngine::Region::Translate |
( |
const Point & | point | ) |
|
|
inline |
Moves the region by the specified amount.
- Parameters
-
| point | The amount to move the region. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 125 of file Region.h.
◆ Height
| int KatanaEngine::Region::Height = 1 |
The height of the region.
Definition at line 135 of file Region.h.
◆ Width
| int KatanaEngine::Region::Width = 1 |
The width of the region.
Definition at line 134 of file Region.h.
| int KatanaEngine::Region::X = 0 |
The left side of the region.
Definition at line 132 of file Region.h.
| int KatanaEngine::Region::Y = 0 |
The top of the region.
Definition at line 133 of file Region.h.
The documentation for this class was generated from the following file: