![]() |
nomlib
|
Rectangle shape container. More...
#include <Rect.hpp>
Public Member Functions | |
| Rect (void) | |
| Default constructor; initialize values to Rect<T>::null. | |
| ~Rect (void) | |
| Destructor. | |
| Rect (T left, T top, T right, T bottom) | |
| Construct a Rectangle from coordinates. | |
| Rect (const Point2< T > &pos, const Size2< T > &size) | |
| Construct an object from a Point2 and Size2 container types. | |
| template<typename U> | |
| Rect (const Rect< U > ©) | |
| Copy constructor. | |
| bool | contains (T xx, T yy) const |
| bool | contains (const Point2< T > &pos) const |
| bool | intersects (const Rect< T > &rectangle) const |
| Checks to see if our rectangle overlaps with another. | |
| const Object | serialize (void) const |
| Save an object to a nom::Value object. | |
| const Point2i | position (void) const |
| const Size2i | size (void) const |
| const T & | left () const |
| const T & | top () const |
| const T & | right () const |
| const T & | bottom () const |
| template<typename U> | |
| void | set_position (const Point2< U > &pos) |
| template<typename U> | |
| void | set_size (const Size2< U > &dims) |
Public Attributes | |
| 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). | |
Static Public Attributes | |
| static NOM_EXPORT const Rect | null |
| Null value. | |
| static NOM_EXPORT const Rect | zero |
| Zeroed values. | |
Rectangle shape container.
|
inline |
Default constructor; initialize values to Rect<T>::null.
|
inline |
|
inlineexplicit |
Copy constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Save an object to a nom::Value object.
Return an Array instead of object?
Rename member key 'width' to 'w'
Rename member key 'h' to 'h'
|
inline |
|
inline |
| T nom::Rect< T >::h |
| T nom::Rect< T >::w |
| T nom::Rect< T >::x |
| T nom::Rect< T >::y |