Public Member Functions | Private Attributes
karto::Rectangle2< T > Class Template Reference

#include <Geometry.h>

List of all members.

Public Member Functions

kt_bool Contains (const Rectangle2< T > &rOther)
GetBottom () const
Vector2< T > GetBottomLeft ()
Vector2< T > GetBottomRight ()
const Vector2< T > GetCenter () const
GetHeight () const
GetLeft () const
const Vector2< T > & GetPosition () const
GetRight () const
const Size2< T > & GetSize () const
GetTop () const
Vector2< T > GetTopLeft ()
Vector2< T > GetTopRight ()
GetWidth () const
GetX () const
GetY () const
kt_bool operator!= (const Rectangle2 &rOther) const
Rectangle2operator= (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

Detailed Description

template<typename T>
class karto::Rectangle2< T >

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.


Constructor & Destructor Documentation

template<typename T>
karto::Rectangle2< T >::Rectangle2 ( ) [inline]

Rectangle with all parameters set to 0

Definition at line 1804 of file Geometry.h.

template<typename T>
karto::Rectangle2< T >::Rectangle2 ( x,
y,
width,
height 
) [inline]

Rectangle with given parameters

Parameters:
xx-coordinate of left edge of rectangle
yy-coordinate of bottom edge of rectangle
widthwidth of rectangle
heightheight of rectangle

Definition at line 1815 of file Geometry.h.

template<typename T>
karto::Rectangle2< T >::Rectangle2 ( const Vector2< T > &  rPosition,
const Size2< T > &  rSize 
) [inline]

Rectangle with given position and size

Parameters:
rPosition(x,y)-coordinate of rectangle
rSizesize of the rectangle

Definition at line 1826 of file Geometry.h.

template<typename T>
karto::Rectangle2< T >::Rectangle2 ( const Vector2< T > &  rTopLeft,
const Vector2< T > &  rBottomRight 
) [inline]

Rectangle with given top-left and bottom-right coordinates

Parameters:
rTopLefttop-left (x,y)-coordinate of rectangle
rBottomRightbottom-right (x,y)-coordinate of rectangle

Definition at line 1837 of file Geometry.h.

template<typename T>
karto::Rectangle2< T >::Rectangle2 ( const Rectangle2< T > &  rOther) [inline]

Copy constructor

Definition at line 1846 of file Geometry.h.


Member Function Documentation

template<typename T>
kt_bool karto::Rectangle2< T >::Contains ( const Rectangle2< T > &  rOther) [inline]

Whether this rectangle contains the given rectangle

Parameters:
rOtherrectangle
Returns:
true if this rectangle contains the given rectangle, false otherwise

Definition at line 2093 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetBottom ( ) const [inline]

Get the bottom coordinate of this rectangle

Returns:
bottom coordinate of this rectangle

Definition at line 2029 of file Geometry.h.

template<typename T>
Vector2<T> karto::Rectangle2< T >::GetBottomLeft ( ) [inline]

Get the bottom-left coordinate of this rectangle

Returns:
bottom-left coordinate of this rectangle

Definition at line 2065 of file Geometry.h.

template<typename T>
Vector2<T> karto::Rectangle2< T >::GetBottomRight ( ) [inline]

Get the bottom-right coordinate of this rectangle

Returns:
bottom-right coordinate of this rectangle

Definition at line 2074 of file Geometry.h.

template<typename T>
const Vector2<T> karto::Rectangle2< T >::GetCenter ( ) const [inline]

Gets the center of this rectangle

Returns:
the center of this rectangle

Definition at line 2083 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetHeight ( ) const [inline]

Gets the height of this rectangle

Returns:
the height of this rectangle

Definition at line 1911 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetLeft ( ) const [inline]

Get the left coordinate of this rectangle

Returns:
left coordinate of this rectangle

Definition at line 1975 of file Geometry.h.

template<typename T>
const Vector2<T>& karto::Rectangle2< T >::GetPosition ( ) const [inline]

Gets the position of this rectangle

Returns:
the position of this rectangle

Definition at line 1929 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetRight ( ) const [inline]

Get the right coordinate of this rectangle

Returns:
right coordinate of this rectangle

Definition at line 2011 of file Geometry.h.

template<typename T>
const Size2<T>& karto::Rectangle2< T >::GetSize ( ) const [inline]

Gets the size of this rectangle

Returns:
the size of this rectangle

Definition at line 1957 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetTop ( ) const [inline]

Get the top coordinate of this rectangle

Returns:
top coordinate of this rectangle

Definition at line 1993 of file Geometry.h.

template<typename T>
Vector2<T> karto::Rectangle2< T >::GetTopLeft ( ) [inline]

Get the top-left coordinate of this rectangle

Returns:
top-left coordinate of this rectangle

Definition at line 2047 of file Geometry.h.

template<typename T>
Vector2<T> karto::Rectangle2< T >::GetTopRight ( ) [inline]

Get the top-right coordinate of this rectangle

Returns:
top-right coordinate of this rectangle

Definition at line 2056 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetWidth ( ) const [inline]

Gets the width of this rectangle

Returns:
the width of this rectangle

Definition at line 1893 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetX ( ) const [inline]

Gets the x-coordinate of the left edge of this rectangle

Returns:
the x-coordinate of the left edge of this rectangle

Definition at line 1857 of file Geometry.h.

template<typename T>
T karto::Rectangle2< T >::GetY ( ) const [inline]

Gets the y-coordinate of the bottom edge of this rectangle

Returns:
the y-coordinate of the bottom edge of this rectangle

Definition at line 1875 of file Geometry.h.

template<typename T>
kt_bool karto::Rectangle2< T >::operator!= ( const Rectangle2< T > &  rOther) const [inline]

Inequality operator

Definition at line 2163 of file Geometry.h.

template<typename T>
Rectangle2& karto::Rectangle2< T >::operator= ( const Rectangle2< T > &  rOther) [inline]

Assignment operator

Definition at line 2144 of file Geometry.h.

template<typename T>
kt_bool karto::Rectangle2< T >::operator== ( const Rectangle2< T > &  rOther) const [inline]

Equality operator

Definition at line 2155 of file Geometry.h.

template<typename T>
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.

template<typename T>
void karto::Rectangle2< T >::SetHeight ( const T &  rHeight) [inline]

Sets the height of this rectangle

Parameters:
rHeightnew height

Definition at line 1920 of file Geometry.h.

template<typename T>
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.

template<typename T>
void karto::Rectangle2< T >::SetPosition ( const T &  rX,
const T &  rY 
) [inline]

Sets the position of this rectangle

Parameters:
rXnew x position
rYnew y position

Definition at line 1939 of file Geometry.h.

template<typename T>
void karto::Rectangle2< T >::SetPosition ( const Vector2< T > &  rPosition) [inline]

Sets the position of this rectangle

Parameters:
rPositionnew position

Definition at line 1948 of file Geometry.h.

template<typename T>
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.

template<typename T>
void karto::Rectangle2< T >::SetSize ( const Size2< T > &  rSize) [inline]

Sets the size of this rectangle

Parameters:
rSizenew size

Definition at line 1966 of file Geometry.h.

template<typename T>
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.

template<typename T>
void karto::Rectangle2< T >::SetWidth ( const T &  rWidth) [inline]

Sets the width of this rectangle

Parameters:
rWidthnew width

Definition at line 1902 of file Geometry.h.

template<typename T>
void karto::Rectangle2< T >::SetX ( const T &  rX) [inline]

Sets the x-coordinate of the left edge of this rectangle

Parameters:
rXnew x-coordinate for the left edge

Definition at line 1866 of file Geometry.h.

template<typename T>
void karto::Rectangle2< T >::SetY ( const T &  rY) [inline]

Sets the y-coordinate of the bottom edge of this rectangle

Parameters:
rYnew y-coordinate for the bottom edge

Definition at line 1884 of file Geometry.h.


Member Data Documentation

template<typename T>
Vector2<T> karto::Rectangle2< T >::m_Position [private]

Definition at line 2169 of file Geometry.h.

template<typename T>
Size2<T> karto::Rectangle2< T >::m_Size [private]

Definition at line 2170 of file Geometry.h.


The documentation for this class was generated from the following file:


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Mon Oct 6 2014 02:44:18