#include <Geometry.h>
Public Member Functions | |
kt_bool | Contains (const Rectangle2< T > &rOther) |
T | GetBottom () const |
Vector2< T > | GetBottomLeft () |
Vector2< T > | GetBottomRight () |
const Vector2< T > | GetCenter () const |
T | GetHeight () const |
T | GetLeft () const |
const Vector2< T > & | GetPosition () const |
T | GetRight () const |
const Size2< T > & | GetSize () const |
T | GetTop () const |
Vector2< T > | GetTopLeft () |
Vector2< T > | GetTopRight () |
T | GetWidth () const |
T | GetX () const |
T | GetY () const |
kt_bool | operator!= (const Rectangle2 &rOther) const |
Rectangle2 & | operator= (const Rectangle2 &rOther) |
kt_bool | operator== (const Rectangle2 &rOther) const |
Rectangle2 () | |
Rectangle2 (T x, T y, T width, T height) | |
Rectangle2 (const Vector2< T > &rPosition, const Size2< T > &rSize) | |
Rectangle2 (const Vector2< T > &rTopLeft, const Vector2< T > &rBottomRight) | |
Rectangle2 (const Rectangle2 &rOther) | |
void | SetBottom (const T &rBottom) |
void | SetHeight (const T &rHeight) |
void | SetLeft (const T &rLeft) |
void | SetPosition (const T &rX, const T &rY) |
void | SetPosition (const Vector2< T > &rPosition) |
void | SetRight (const T &rRight) |
void | SetSize (const Size2< T > &rSize) |
void | SetTop (const T &rTop) |
void | SetWidth (const T &rWidth) |
void | SetX (const T &rX) |
void | SetY (const T &rY) |
Private Attributes | |
Vector2< T > | m_Position |
Size2< T > | m_Size |
Stores x, y, width and height that represents the location and size of a rectangle. Note that (x, y) is at bottom-left in the mapper!
Definition at line 1798 of file Geometry.h.
karto::Rectangle2< T >::Rectangle2 | ( | ) | [inline] |
Rectangle with all parameters set to 0
Definition at line 1804 of file Geometry.h.
karto::Rectangle2< T >::Rectangle2 | ( | T | x, |
T | y, | ||
T | width, | ||
T | height | ||
) | [inline] |
Rectangle with given parameters
x | x-coordinate of left edge of rectangle |
y | y-coordinate of bottom edge of rectangle |
width | width of rectangle |
height | height of rectangle |
Definition at line 1815 of file Geometry.h.
karto::Rectangle2< T >::Rectangle2 | ( | const Vector2< T > & | rPosition, |
const Size2< T > & | rSize | ||
) | [inline] |
Rectangle with given position and size
rPosition | (x,y)-coordinate of rectangle |
rSize | size of the rectangle |
Definition at line 1826 of file Geometry.h.
karto::Rectangle2< T >::Rectangle2 | ( | const Vector2< T > & | rTopLeft, |
const Vector2< T > & | rBottomRight | ||
) | [inline] |
Rectangle with given top-left and bottom-right coordinates
rTopLeft | top-left (x,y)-coordinate of rectangle |
rBottomRight | bottom-right (x,y)-coordinate of rectangle |
Definition at line 1837 of file Geometry.h.
karto::Rectangle2< T >::Rectangle2 | ( | const Rectangle2< T > & | rOther | ) | [inline] |
Copy constructor
Definition at line 1846 of file Geometry.h.
kt_bool karto::Rectangle2< T >::Contains | ( | const Rectangle2< T > & | rOther | ) | [inline] |
Whether this rectangle contains the given rectangle
rOther | rectangle |
Definition at line 2093 of file Geometry.h.
T karto::Rectangle2< T >::GetBottom | ( | ) | const [inline] |
Get the bottom coordinate of this rectangle
Definition at line 2029 of file Geometry.h.
Vector2<T> karto::Rectangle2< T >::GetBottomLeft | ( | ) | [inline] |
Get the bottom-left coordinate of this rectangle
Definition at line 2065 of file Geometry.h.
Vector2<T> karto::Rectangle2< T >::GetBottomRight | ( | ) | [inline] |
Get the bottom-right coordinate of this rectangle
Definition at line 2074 of file Geometry.h.
const Vector2<T> karto::Rectangle2< T >::GetCenter | ( | ) | const [inline] |
Gets the center of this rectangle
Definition at line 2083 of file Geometry.h.
T karto::Rectangle2< T >::GetHeight | ( | ) | const [inline] |
Gets the height of this rectangle
Definition at line 1911 of file Geometry.h.
T karto::Rectangle2< T >::GetLeft | ( | ) | const [inline] |
Get the left coordinate of this rectangle
Definition at line 1975 of file Geometry.h.
const Vector2<T>& karto::Rectangle2< T >::GetPosition | ( | ) | const [inline] |
Gets the position of this rectangle
Definition at line 1929 of file Geometry.h.
T karto::Rectangle2< T >::GetRight | ( | ) | const [inline] |
Get the right coordinate of this rectangle
Definition at line 2011 of file Geometry.h.
const Size2<T>& karto::Rectangle2< T >::GetSize | ( | ) | const [inline] |
Gets the size of this rectangle
Definition at line 1957 of file Geometry.h.
T karto::Rectangle2< T >::GetTop | ( | ) | const [inline] |
Get the top coordinate of this rectangle
Definition at line 1993 of file Geometry.h.
Vector2<T> karto::Rectangle2< T >::GetTopLeft | ( | ) | [inline] |
Get the top-left coordinate of this rectangle
Definition at line 2047 of file Geometry.h.
Vector2<T> karto::Rectangle2< T >::GetTopRight | ( | ) | [inline] |
Get the top-right coordinate of this rectangle
Definition at line 2056 of file Geometry.h.
T karto::Rectangle2< T >::GetWidth | ( | ) | const [inline] |
Gets the width of this rectangle
Definition at line 1893 of file Geometry.h.
T karto::Rectangle2< T >::GetX | ( | ) | const [inline] |
Gets the x-coordinate of the left edge of this rectangle
Definition at line 1857 of file Geometry.h.
T karto::Rectangle2< T >::GetY | ( | ) | const [inline] |
Gets the y-coordinate of the bottom edge of this rectangle
Definition at line 1875 of file Geometry.h.
kt_bool karto::Rectangle2< T >::operator!= | ( | const Rectangle2< T > & | rOther | ) | const [inline] |
Inequality operator
Definition at line 2163 of file Geometry.h.
Rectangle2& karto::Rectangle2< T >::operator= | ( | const Rectangle2< T > & | rOther | ) | [inline] |
Assignment operator
Definition at line 2144 of file Geometry.h.
kt_bool karto::Rectangle2< T >::operator== | ( | const Rectangle2< T > & | rOther | ) | const [inline] |
Equality operator
Definition at line 2155 of file Geometry.h.
void karto::Rectangle2< T >::SetBottom | ( | const T & | rBottom | ) | [inline] |
Set the bottom coordinate of this rectangle param rBottom new bottom coordinate of this rectangle
Definition at line 2038 of file Geometry.h.
void karto::Rectangle2< T >::SetHeight | ( | const T & | rHeight | ) | [inline] |
Sets the height of this rectangle
rHeight | new height |
Definition at line 1920 of file Geometry.h.
void karto::Rectangle2< T >::SetLeft | ( | const T & | rLeft | ) | [inline] |
Set the left coordinate of this rectangle param rLeft new left coordinate of this rectangle
Definition at line 1984 of file Geometry.h.
void karto::Rectangle2< T >::SetPosition | ( | const T & | rX, |
const T & | rY | ||
) | [inline] |
Sets the position of this rectangle
rX | new x position |
rY | new y position |
Definition at line 1939 of file Geometry.h.
void karto::Rectangle2< T >::SetPosition | ( | const Vector2< T > & | rPosition | ) | [inline] |
Sets the position of this rectangle
rPosition | new position |
Definition at line 1948 of file Geometry.h.
void karto::Rectangle2< T >::SetRight | ( | const T & | rRight | ) | [inline] |
Set the right coordinate of this rectangle param rRight new right coordinate of this rectangle
Definition at line 2020 of file Geometry.h.
void karto::Rectangle2< T >::SetSize | ( | const Size2< T > & | rSize | ) | [inline] |
Sets the size of this rectangle
rSize | new size |
Definition at line 1966 of file Geometry.h.
void karto::Rectangle2< T >::SetTop | ( | const T & | rTop | ) | [inline] |
Set the top coordinate of this rectangle param rTop new top coordinate of this rectangle
Definition at line 2002 of file Geometry.h.
void karto::Rectangle2< T >::SetWidth | ( | const T & | rWidth | ) | [inline] |
Sets the width of this rectangle
rWidth | new width |
Definition at line 1902 of file Geometry.h.
void karto::Rectangle2< T >::SetX | ( | const T & | rX | ) | [inline] |
Sets the x-coordinate of the left edge of this rectangle
rX | new x-coordinate for the left edge |
Definition at line 1866 of file Geometry.h.
void karto::Rectangle2< T >::SetY | ( | const T & | rY | ) | [inline] |
Sets the y-coordinate of the bottom edge of this rectangle
rY | new y-coordinate for the bottom edge |
Definition at line 1884 of file Geometry.h.
Vector2<T> karto::Rectangle2< T >::m_Position [private] |
Definition at line 2169 of file Geometry.h.
Size2<T> karto::Rectangle2< T >::m_Size [private] |
Definition at line 2170 of file Geometry.h.