Rectangle shape container.
More...
#include <Rect.hpp>
|
| T | x |
| | Left coordinate of the rectangle (X coordinate of Rectangle).
|
| T | y |
| | Top coordinate of the rectangle (Y coordinate of Rectangle).
|
| T | w |
| | Width of the rectangle (right side of Rectangle).
|
| T | h |
| | Height of the rectangle (bottom side of Rectangle).
|
template<typename T>
struct nom::Rect< T >
Rectangle shape container.
Definition at line 46 of file Rect.hpp.
◆ Rect() [1/4]
◆ ~Rect()
Destructor.
Definition at line 59 of file Rect.hpp.
◆ Rect() [2/4]
template<typename T>
| nom::Rect< T >::Rect |
( |
T | left, |
|
|
T | top, |
|
|
T | right, |
|
|
T | bottom ) |
|
inline |
◆ Rect() [3/4]
◆ Rect() [4/4]
template<typename T>
template<typename U>
| nom::Rect< T >::Rect |
( |
const Rect< U > & | copy | ) |
|
|
inlineexplicit |
Copy constructor.
Definition at line 90 of file Rect.hpp.
◆ bottom()
◆ contains() [1/2]
Check to see if an input Point2 container are within the bounds of this object (think: colliding)
Definition at line 111 of file Rect.hpp.
◆ contains() [2/2]
template<typename T>
| bool nom::Rect< T >::contains |
( |
T | x, |
|
|
T | y ) const |
|
inline |
Check to see if input coordinates X and Y are within the bounds of this object (think: colliding)
Definition at line 101 of file Rect.hpp.
◆ intersects()
template<typename T>
| bool nom::Rect< T >::intersects |
( |
const Rect< T > & | rectangle | ) |
const |
|
inline |
Checks to see if our rectangle overlaps with another.
Definition at line 117 of file Rect.hpp.
◆ left()
◆ position()
template<typename T>
| const Point2i nom::Rect< T >::position |
( |
void | | ) |
const |
|
inline |
- Returns
- The positioning coordinates of the rectangle.
Definition at line 162 of file Rect.hpp.
◆ right()
◆ serialize()
template<typename T>
| const Object nom::Rect< T >::serialize |
( |
void | | ) |
const |
|
inline |
Save an object to a nom::Value object.
- Todo
Return an Array instead of object?
Rename member key 'width' to 'w'
Rename member key 'h' to 'h'
Definition at line 149 of file Rect.hpp.
◆ set_position()
template<typename T>
template<typename U>
◆ set_size()
template<typename T>
template<typename U>
◆ size()
template<typename T>
| const Size2i nom::Rect< T >::size |
( |
void | | ) |
const |
|
inline |
- Returns
- The width and height dimensions of the rectangle.
Definition at line 168 of file Rect.hpp.
◆ top()
◆ null
Left coordinate of the rectangle (X coordinate of Rectangle).
Definition at line 216 of file Rect.hpp.
Top coordinate of the rectangle (Y coordinate of Rectangle).
Definition at line 219 of file Rect.hpp.
◆ zero
Zeroed values.
Definition at line 213 of file Rect.hpp.
The documentation for this struct was generated from the following file:
- /home/jeff/Projects/nomlib.git/include/nomlib/math/Rect.hpp