29 #ifndef NOMLIB_COORDS_HEADERS
30 #define NOMLIB_COORDS_HEADERS
34 #include "nomlib/config.hpp"
38 const std::string coords_delimiter =
", ";
57 Coords ( int32 x, int32 y, int32 width, int32 height );
60 Coords ( int32 x, int32 y );
66 bool isNull (
void )
const;
69 const Coords&
get ( void )
const;
71 Coords getPosition (
void )
const;
72 void setPosition ( int32 x, int32 y );
74 Coords getSize (
void )
const;
75 void setSize ( int32 width, int32 height );
79 bool contains ( int32 x, int32 y )
const;
116 std::ostream& operator << ( std::ostream& os,
const Coords& coords );
118 bool operator == (
const Coords& left,
const Coords& right );
119 bool operator != (
const Coords& left,
const Coords& right );
133 #endif // NOMLIB_COORDS_HEADERS defined
Coords & operator=(const Coords &other)
Copy assignment operator.
static const Coords null
Convenience object that will always contain a value of -1.
Coords(void)
Default constructor; sets all values to their respective defaults.
int32 & h
Reference alias for height instance variable.
bool intersects(Coords &rectangle) const
Checks to see if our rectangle overlaps with another.
bool contains(int32 x, int32 y) const
Coordinate values (x, y, z, width, height ) wrapper.
int32 & w
Reference alias for width instance variable.