Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Public Attributes | List of all members
Mezzanine::RectBase< NumType > Class Template Reference

A class for tracking a rectangle by tracking two corners Top, Left and Right, Bottom. More...

#include <rect.h>

Public Types

typedef RectBase< NumType > SelfType
 Convenience typedef for describing the type you are working with.
 

Public Member Functions

 RectBase ()
 Blank constructor.
 
 RectBase (const NumType RectLeft, const NumType RectTop, const NumType RectRight, const NumType RectBottom)
 Descriptive constructor. More...
 
 ~RectBase ()
 Class destructor.
 
void ClampToSize (const NumType Width, const NumType Height)
 Clamps the position and size of this Rect to the provided size. More...
 
NumType GetHeight () const
 Gets the height of this Rect. More...
 
NumType GetWidth () const
 Gets the width of this Rect. More...
 
Boole operator!= (const SelfType &Other)
 Inequality Operator. More...
 
void operator= (const SelfType &Other)
 Assignment Operator. More...
 
Boole operator== (const SelfType &Other)
 Equality Operator. More...
 
void SetValues (const NumType RectLeft, const NumType RectTop, const NumType RectRight, const NumType RectBottom)
 Sets the value of each member of this Rect. More...
 
void SetZero ()
 Sets all values of this Rect to zero.
 

Public Attributes

NumType Bottom
 The Bottom edge of the rect.
 
NumType Left
 The Left edge of the rect.
 
NumType Right
 The Right edge of the rect.
 
NumType Top
 The Top edge of the rect.
 

Detailed Description

template<typename NumType>
class Mezzanine::RectBase< NumType >

A class for tracking a rectangle by tracking two corners Top, Left and Right, Bottom.

Definition at line 50 of file rect.h.

Constructor & Destructor Documentation

template<typename NumType>
Mezzanine::RectBase< NumType >::RectBase ( const NumType  RectLeft,
const NumType  RectTop,
const NumType  RectRight,
const NumType  RectBottom 
)
inline

Descriptive constructor.

Parameters
RectLeftThe Left edge of the Rect.
RectTopThe Top edge of the Rect.
RectRightThe Right edge of the Rect.
RectBottomThe Bottom edge of the Rect.

Definition at line 86 of file rect.h.

Member Function Documentation

template<typename NumType>
void Mezzanine::RectBase< NumType >::ClampToSize ( const NumType  Width,
const NumType  Height 
)
inline

Clamps the position and size of this Rect to the provided size.

Parameters
WidthThe width of the area this Rect will be placed in.
HeightThe height of the area this Rect will be placed in.

Definition at line 123 of file rect.h.

template<typename NumType>
NumType Mezzanine::RectBase< NumType >::GetHeight ( ) const
inline

Gets the height of this Rect.

Returns
Returns the height of this Rect.

Definition at line 137 of file rect.h.

template<typename NumType>
NumType Mezzanine::RectBase< NumType >::GetWidth ( ) const
inline

Gets the width of this Rect.

Returns
Returns the width of this Rect.

Definition at line 133 of file rect.h.

template<typename NumType>
Boole Mezzanine::RectBase< NumType >::operator!= ( const SelfType Other)
inline

Inequality Operator.

Parameters
OtherThe other Rect to compare with.
Returns
Returns true if the two Rects express different areas.

Definition at line 161 of file rect.h.

template<typename NumType>
void Mezzanine::RectBase< NumType >::operator= ( const SelfType Other)
inline

Assignment Operator.

Parameters
OtherThe other Rect to copy data from.

Definition at line 145 of file rect.h.

template<typename NumType>
Boole Mezzanine::RectBase< NumType >::operator== ( const SelfType Other)
inline

Equality Operator.

Parameters
OtherThe other Rect to compare with.
Returns
Returns true if both Rects express the same area.

Definition at line 156 of file rect.h.

template<typename NumType>
void Mezzanine::RectBase< NumType >::SetValues ( const NumType  RectLeft,
const NumType  RectTop,
const NumType  RectRight,
const NumType  RectBottom 
)
inline

Sets the value of each member of this Rect.

Parameters
RectLeftThe Left edge of the Rect.
RectTopThe Top edge of the Rect.
RectRightThe Right edge of the Rect.
RectBottomThe Bottom edge of the Rect.

Definition at line 112 of file rect.h.


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