Public Member Functions | Public Attributes

sp::dim::rect2d< T > Class Template Reference

#include <spDimensionRect2D.hpp>

List of all members.

Public Member Functions

 rect2d ()
 rect2d (T X, T Y)
 rect2d (T NewLeft, T NewTop, T NewRight, T NewBottom)
 rect2d (const rect2d< T > &Other)
 ~rect2d ()
bool operator== (const rect2d< T > &other) const
bool operator!= (const rect2d< T > &other) const
rect2d< T > operator+ (const rect2d< T > &other) const
rect2d< T > & operator+= (const rect2d< T > &other)
rect2d< T > operator- (const rect2d< T > &other) const
rect2d< T > & operator-= (const rect2d< T > &other)
rect2d< T > operator/ (const rect2d< T > &other) const
rect2d< T > & operator/= (const rect2d< T > &other)
rect2d< T > operator* (const rect2d< T > &other) const
rect2d< T > & operator*= (const rect2d< T > &other)
rect2d< T > operator- () const
void setSize (const size2d< T > &Size)
 Sets the rectangle's size.
size2d< T > getSize () const
 Returns the rectangle's size.
void setCenter (const point2d< T > &Center)
 Sets the rectangle's center point.
point2d< T > getCenter () const
 Returns the rectangle's center point.
void setLTPoint (const point2d< T > &Point)
 Sets the left-top point.
point2d< T > getLTPoint () const
 Returns the left-top point.
void setRBPoint (const point2d< T > &Point)
 Sets the right-bottom point.
point2d< T > getRBPoint () const
 Returns the right-bottom point.
getWidth () const
 Returns the rectangle's width (Right - Left).
getHeight () const
 Returns the rectangle's height (Bottom - Top).
bool empty () const
 Returns true if all four components are 0.
bool valid () const
 Returns true if this is a valid rectangle.
rect2d< T > & repair ()
bool overlap (const point2d< T > &Point) const
bool overlap (const rect2d< T > &other) const
template<typename B >
rect2d< B > cast () const

Public Attributes

Left
Right
Top
Bottom

template<typename T>
class sp::dim::rect2d< T >


Constructor & Destructor Documentation

template<typename T>
sp::dim::rect2d< T >::rect2d (  )  [inline]
template<typename T>
sp::dim::rect2d< T >::rect2d ( X,
Y 
) [inline]
template<typename T>
sp::dim::rect2d< T >::rect2d ( NewLeft,
NewTop,
NewRight,
NewBottom 
) [inline]
template<typename T>
sp::dim::rect2d< T >::rect2d ( const rect2d< T > &  Other  )  [inline]
template<typename T>
sp::dim::rect2d< T >::~rect2d (  )  [inline]

Member Function Documentation

template<typename T>
template<typename B >
rect2d<B> sp::dim::rect2d< T >::cast (  )  const [inline]
template<typename T>
bool sp::dim::rect2d< T >::empty (  )  const [inline]

Returns true if all four components are 0.

template<typename T>
point2d<T> sp::dim::rect2d< T >::getCenter (  )  const [inline]

Returns the rectangle's center point.

template<typename T>
T sp::dim::rect2d< T >::getHeight (  )  const [inline]

Returns the rectangle's height (Bottom - Top).

template<typename T>
point2d<T> sp::dim::rect2d< T >::getLTPoint (  )  const [inline]

Returns the left-top point.

template<typename T>
point2d<T> sp::dim::rect2d< T >::getRBPoint (  )  const [inline]

Returns the right-bottom point.

template<typename T>
size2d<T> sp::dim::rect2d< T >::getSize (  )  const [inline]

Returns the rectangle's size.

template<typename T>
T sp::dim::rect2d< T >::getWidth (  )  const [inline]

Returns the rectangle's width (Right - Left).

template<typename T>
bool sp::dim::rect2d< T >::operator!= ( const rect2d< T > &  other  )  const [inline]
template<typename T>
rect2d<T> sp::dim::rect2d< T >::operator* ( const rect2d< T > &  other  )  const [inline]
template<typename T>
rect2d<T>& sp::dim::rect2d< T >::operator*= ( const rect2d< T > &  other  )  [inline]
template<typename T>
rect2d<T> sp::dim::rect2d< T >::operator+ ( const rect2d< T > &  other  )  const [inline]
template<typename T>
rect2d<T>& sp::dim::rect2d< T >::operator+= ( const rect2d< T > &  other  )  [inline]
template<typename T>
rect2d<T> sp::dim::rect2d< T >::operator- ( const rect2d< T > &  other  )  const [inline]
template<typename T>
rect2d<T> sp::dim::rect2d< T >::operator- (  )  const [inline]
template<typename T>
rect2d<T>& sp::dim::rect2d< T >::operator-= ( const rect2d< T > &  other  )  [inline]
template<typename T>
rect2d<T> sp::dim::rect2d< T >::operator/ ( const rect2d< T > &  other  )  const [inline]
template<typename T>
rect2d<T>& sp::dim::rect2d< T >::operator/= ( const rect2d< T > &  other  )  [inline]
template<typename T>
bool sp::dim::rect2d< T >::operator== ( const rect2d< T > &  other  )  const [inline]
template<typename T>
bool sp::dim::rect2d< T >::overlap ( const rect2d< T > &  other  )  const [inline]
template<typename T>
bool sp::dim::rect2d< T >::overlap ( const point2d< T > &  Point  )  const [inline]
template<typename T>
rect2d<T>& sp::dim::rect2d< T >::repair (  )  [inline]
template<typename T>
void sp::dim::rect2d< T >::setCenter ( const point2d< T > &  Center  )  [inline]

Sets the rectangle's center point.

template<typename T>
void sp::dim::rect2d< T >::setLTPoint ( const point2d< T > &  Point  )  [inline]

Sets the left-top point.

template<typename T>
void sp::dim::rect2d< T >::setRBPoint ( const point2d< T > &  Point  )  [inline]

Sets the right-bottom point.

template<typename T>
void sp::dim::rect2d< T >::setSize ( const size2d< T > &  Size  )  [inline]

Sets the rectangle's size.

template<typename T>
bool sp::dim::rect2d< T >::valid (  )  const [inline]

Returns true if this is a valid rectangle.


Member Data Documentation

template<typename T>
T sp::dim::rect2d< T >::Bottom
template<typename T>
T sp::dim::rect2d< T >::Left
template<typename T>
T sp::dim::rect2d< T >::Right
template<typename T>
T sp::dim::rect2d< T >::Top

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines