alaCarte Maps
Renderer for OpenStreetMap tiles
basic_rect< T > Class Template Reference

#include <rect.hpp>

Public Member Functions

 basic_rect ()
 
 basic_rect (const basic_vector2< T > &p1, const basic_vector2< T > &p2)
 
 basic_rect (T minX, T minY, T maxX, T maxY)
 
 basic_rect (const basic_vector2< T > &minCoord, T width, T height)
 
basic_rect< T > translate (T dx, T dy) const
 
basic_rect< T > grow (T dx, T dy) const
 
void enclose (const basic_rect< T > &other)
 
void enclose (const basic_vector2< T > &other)
 
getArea () const
 
basic_vector2< T > getCenter () const
 
basic_rect< T > getIntersection (const basic_rect< T > &other) const
 
bool contains (const basic_vector2< T > &p) const
 
bool contains (const basic_rect< T > &other) const
 
bool intersects (const basic_rect< T > &bounding) const
 
getWidth () const
 
getHeight () const
 

Public Attributes

minX
 
minY
 
maxX
 
maxY
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, const unsigned int version)
 
bool between (const T &min, const T &value, const T &max) const
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename T>
class basic_rect< T >

Definition at line 40 of file rect.hpp.

Constructor & Destructor Documentation

template<typename T>
basic_rect< T >::basic_rect ( )
inline

Definition at line 56 of file rect.hpp.

template<typename T>
basic_rect< T >::basic_rect ( const basic_vector2< T > &  p1,
const basic_vector2< T > &  p2 
)
inline

Definition at line 58 of file rect.hpp.

template<typename T>
basic_rect< T >::basic_rect ( minX,
minY,
maxX,
maxY 
)
inline

Definition at line 68 of file rect.hpp.

template<typename T>
basic_rect< T >::basic_rect ( const basic_vector2< T > &  minCoord,
width,
height 
)
inline

Definition at line 78 of file rect.hpp.

Member Function Documentation

template<typename T>
bool basic_rect< T >::between ( const T &  min,
const T &  value,
const T &  max 
) const
inlineprivate

Definition at line 163 of file rect.hpp.

template<typename T>
bool basic_rect< T >::contains ( const basic_vector2< T > &  p) const
inline

Definition at line 130 of file rect.hpp.

template<typename T>
bool basic_rect< T >::contains ( const basic_rect< T > &  other) const
inline

Definition at line 135 of file rect.hpp.

template<typename T>
void basic_rect< T >::enclose ( const basic_rect< T > &  other)
inline

Definition at line 96 of file rect.hpp.

template<typename T>
void basic_rect< T >::enclose ( const basic_vector2< T > &  other)
inline

Definition at line 104 of file rect.hpp.

template<typename T>
T basic_rect< T >::getArea ( ) const
inline

Definition at line 112 of file rect.hpp.

template<typename T>
basic_vector2<T> basic_rect< T >::getCenter ( ) const
inline

Definition at line 116 of file rect.hpp.

template<typename T>
T basic_rect< T >::getHeight ( ) const
inline

Definition at line 158 of file rect.hpp.

template<typename T>
basic_rect<T> basic_rect< T >::getIntersection ( const basic_rect< T > &  other) const
inline

Definition at line 120 of file rect.hpp.

template<typename T>
T basic_rect< T >::getWidth ( ) const
inline

Definition at line 154 of file rect.hpp.

template<typename T>
basic_rect<T> basic_rect< T >::grow ( dx,
dy 
) const
inline

Definition at line 91 of file rect.hpp.

template<typename T>
bool basic_rect< T >::intersects ( const basic_rect< T > &  bounding) const
inline

Definition at line 143 of file rect.hpp.

template<typename T>
template<typename Archive >
void basic_rect< T >::serialize ( Archive ar,
const unsigned int  version 
)
inlineprivate

Definition at line 44 of file rect.hpp.

template<typename T>
basic_rect<T> basic_rect< T >::translate ( dx,
dy 
) const
inline

Definition at line 86 of file rect.hpp.

Friends And Related Function Documentation

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

Definition at line 42 of file rect.hpp.

Member Data Documentation

template<typename T>
T basic_rect< T >::maxX

Definition at line 53 of file rect.hpp.

template<typename T>
T basic_rect< T >::maxY

Definition at line 54 of file rect.hpp.

template<typename T>
T basic_rect< T >::minX

Definition at line 51 of file rect.hpp.

template<typename T>
T basic_rect< T >::minY

Definition at line 52 of file rect.hpp.


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