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. More...
|
| |
| | Region (const Point position, const int width, const int height) |
| | Instantiates a new Region object. More...
|
| |
| | Region (const int x, const int y, const int width, const int height) |
| | Instantiates a new Region object. More...
|
| |
| void | Set (const int x, const int y, const int width, const int height) |
| | Sets the components of the region. More...
|
| |
| int | GetTop () |
| | The top of the region. More...
|
| |
| int | GetBottom () |
| | The bottom of the region. More...
|
| |
| int | GetLeft () |
| | The left side of the region. More...
|
| |
| int | GetRight () |
| | The right side of the region. More...
|
| |
| Point | GetTopLeft () |
| | The top left corner of the region. More...
|
| |
| Point | GetTopRight () |
| | The top right corner of the region. More...
|
| |
| Point | GetBottomLeft () |
| | The bottom left corner of the region. More...
|
| |
| Point | GetBottomRight () |
| | The bottom right corner of the region. More...
|
| |
| Vector2 | GetCenter () |
| | The center position of the region. More...
|
| |
| void | Translate (const int x, const int y) |
| | Moves the region by the specified amount. More...
|
| |
| void | Translate (const Point &point) |
| | Moves the region by the specified amount. More...
|
| |
|
|
int | X |
| | The left side of the region.
|
| |
|
int | Y |
| | The top of the region.
|
| |
|
int | Width |
| | The width of the region.
|
| |
|
int | Height |
| | The height of the region.
|
| |
Defines a rectangular region defined by a point, height, width.
◆ Region() [1/3]
| 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.
◆ Region() [2/3]
| 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.
◆ Region() [3/3]
| 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.
◆ GetBottom()
| int KatanaEngine::Region::GetBottom |
( |
| ) |
|
|
inline |
The bottom of the region.
- Returns
- Returns the bottom.
◆ GetBottomLeft()
| Point KatanaEngine::Region::GetBottomLeft |
( |
| ) |
|
|
inline |
The bottom left corner of the region.
- Returns
- Returns the bottom left corner.
◆ GetBottomRight()
| Point KatanaEngine::Region::GetBottomRight |
( |
| ) |
|
|
inline |
The bottom right corner of the region.
- Returns
- Returns the bottom right corner.
◆ GetCenter()
| Vector2 KatanaEngine::Region::GetCenter |
( |
| ) |
|
|
inline |
The center position of the region.
- Returns
- Returns the center position.
◆ GetLeft()
| int KatanaEngine::Region::GetLeft |
( |
| ) |
|
|
inline |
The left side of the region.
- Returns
- Returns the left side.
◆ GetRight()
| int KatanaEngine::Region::GetRight |
( |
| ) |
|
|
inline |
The right side of the region.
- Returns
- Returns the right side.
◆ GetTop()
| int KatanaEngine::Region::GetTop |
( |
| ) |
|
|
inline |
The top of the region.
- Returns
- Returns the top.
◆ GetTopLeft()
| Point KatanaEngine::Region::GetTopLeft |
( |
| ) |
|
|
inline |
The top left corner of the region.
- Returns
- Returns the top left corner.
◆ GetTopRight()
| Point KatanaEngine::Region::GetTopRight |
( |
| ) |
|
|
inline |
The top right corner of the region.
- Returns
- Returns the top right corner.
◆ 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.
◆ 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. |
◆ 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.
The documentation for this class was generated from the following file: