Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
karto::Rectangle2< T > Class Template Reference

#include <Karto.h>

Public Member Functions

const Vector2< T > GetCenter () const
 
GetHeight () const
 
const Vector2< T > & GetPosition () const
 
const Size2< T > & GetSize () const
 
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 (const Rectangle2 &rOther)
 
 Rectangle2 (const Vector2< T > &rPosition, const Size2< T > &rSize)
 
 Rectangle2 (T x, T y, T width, T height)
 
void SetHeight (T height)
 
void SetPosition (const T &rX, const T &rY)
 
void SetPosition (const Vector2< T > &rPosition)
 
void SetSize (const Size2< T > &rSize)
 
void SetWidth (T width)
 
void SetX (T x)
 
void SetY (T y)
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

Vector2< T > m_Position
 
Size2< T > m_Size
 

Friends

class boost::serialization::access
 

Detailed Description

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

Stores x, y, width and height that represents the location and size of a rectangle (x, y) is at bottom left in mapper!

Definition at line 1823 of file Karto.h.

Constructor & Destructor Documentation

◆ Rectangle2() [1/4]

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

Default constructor

Definition at line 1829 of file Karto.h.

◆ Rectangle2() [2/4]

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

Constructor initializing rectangle 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 1840 of file Karto.h.

◆ Rectangle2() [3/4]

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

Constructor initializing rectangle parameters

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

Definition at line 1851 of file Karto.h.

◆ Rectangle2() [4/4]

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

Copy constructor

Definition at line 1860 of file Karto.h.

Member Function Documentation

◆ GetCenter()

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 1989 of file Karto.h.

◆ GetHeight()

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 1925 of file Karto.h.

◆ GetPosition()

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 1943 of file Karto.h.

◆ GetSize()

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 1971 of file Karto.h.

◆ GetWidth()

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 1907 of file Karto.h.

◆ GetX()

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 1871 of file Karto.h.

◆ GetY()

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 1889 of file Karto.h.

◆ operator!=()

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

Inequality operator

Definition at line 2017 of file Karto.h.

◆ operator=()

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

Assignment operator

Definition at line 1998 of file Karto.h.

◆ operator==()

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

Equality operator

Definition at line 2009 of file Karto.h.

◆ serialize()

template<typename T >
template<class Archive >
void karto::Rectangle2< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Definition at line 2030 of file Karto.h.

◆ SetHeight()

template<typename T >
void karto::Rectangle2< T >::SetHeight ( height)
inline

Sets the height of this rectangle

Parameters
heightthe height of this rectangle

Definition at line 1934 of file Karto.h.

◆ SetPosition() [1/2]

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

Sets the position of this rectangle

Parameters
rXx
rYy

Definition at line 1953 of file Karto.h.

◆ SetPosition() [2/2]

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

Sets the position of this rectangle

Parameters
rPositionposition

Definition at line 1962 of file Karto.h.

◆ SetSize()

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

Sets the size of this rectangle

Parameters
rSizesize

Definition at line 1980 of file Karto.h.

◆ SetWidth()

template<typename T >
void karto::Rectangle2< T >::SetWidth ( width)
inline

Sets the width of this rectangle

Parameters
widththe width of this rectangle

Definition at line 1916 of file Karto.h.

◆ SetX()

template<typename T >
void karto::Rectangle2< T >::SetX ( x)
inline

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

Parameters
xthe x-coordinate of the left edge of this rectangle

Definition at line 1880 of file Karto.h.

◆ SetY()

template<typename T >
void karto::Rectangle2< T >::SetY ( y)
inline

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

Parameters
ythe y-coordinate of the bottom edge of this rectangle

Definition at line 1898 of file Karto.h.

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename T >
friend class boost::serialization::access
friend

Serialization: class Rectangle2

Definition at line 2028 of file Karto.h.

Member Data Documentation

◆ m_Position

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

Definition at line 2023 of file Karto.h.

◆ m_Size

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

Definition at line 2024 of file Karto.h.


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


slam_toolbox
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:37:56