cinder::AreaT< T > Class Template Reference

#include <Area.h>

List of all members.

Public Member Functions

 AreaT ()
 AreaT (const Vec2< T > &UL, const Vec2< T > &LR)
 AreaT (T aX1, T aY1, T aX2, T aY2)
template<typename Y >
 AreaT (const AreaT< Y > &aAreaBase)
void set (T aX1, T aY1, T aX2, T aY2)
getWidth () const
getHeight () const
Vec2< T > getSize () const
calcArea () const
void clipBy (const AreaT< T > &clip)
AreaT< T > getClipBy (const AreaT< T > &clip) const
void offsetBy (const Vec2< T > &offset)
 Translates the AreaT by offset.
AreaT< T > getOffsetBy (const Vec2< T > &offset) const
 Returns a copy of the AreaT translated by offset.
void moveULTo (const Vec2< T > &newUL)
 Translates the AreaT so that its upper-left corner is newUL.
AreaT< T > getMoveULTo (const Vec2< T > &newUL) const
 Returns a copy of the AreaT translated so that its upper-left corner is newUL.
void expand (T expandX, T expandY)
 Expands the AreaT by expandX horizontally and expandY vertically. expandX is subtracted from x1 and added to x2 and expandY is subtracted from y1 and added to y2.
getX1 () const
void setX1 (T aX1)
getY1 () const
void setY1 (T aY1)
getX2 () const
void setX2 (T aX2)
getY2 () const
void setY2 (T aY2)
Vec2< T > getUL () const
Vec2< T > getLR () const
bool isInside (const Vec2< T > &offset) const
template<typename Y >
bool isInside (const Vec2< Y > &offset) const
bool intersects (const AreaT< T > &area) const
bool operator== (const AreaT< T > &aArea) const
bool operator< (const AreaT< T > &aArea) const
AreaT< T > operator+ (const Vec2< T > &offset) const
template<>
 AreaT (const AreaT< boost::rational< int32_t > > &aAreaBase)
template<>
 AreaT (const AreaT< int32_t > &aAreaBase)

Static Public Member Functions

static AreaT< T > proportionalFit (const AreaT< T > &srcArea, const AreaT< T > &dstArea, bool center, bool expand=false)

Public Attributes

x1
y1
x2
y2

Friends

std::ostream & operator<< (std::ostream &o, const AreaT< T > &area)

template<typename T>
class cinder::AreaT< T >


Constructor & Destructor Documentation

template<typename T>
cinder::AreaT< T >::AreaT (  ) 
template<typename T>
cinder::AreaT< T >::AreaT ( const Vec2< T > &  UL,
const Vec2< T > &  LR 
)
template<typename T>
cinder::AreaT< T >::AreaT ( aX1,
aY1,
aX2,
aY2 
)
template<typename T>
template<typename Y >
cinder::AreaT< T >::AreaT ( const AreaT< Y > &  aAreaBase  )  [explicit]
template<>
cinder::AreaT< int32_t >::AreaT ( const AreaT< boost::rational< int32_t > > &  aAreaBase  ) 
template<>
cinder::AreaT< boost::rational< int32_t > >::AreaT ( const AreaT< int32_t > &  aAreaBase  ) 

Member Function Documentation

template<typename T>
void cinder::AreaT< T >::set ( aX1,
aY1,
aX2,
aY2 
)
template<typename T>
T cinder::AreaT< T >::getWidth (  )  const
template<typename T>
T cinder::AreaT< T >::getHeight (  )  const
template<typename T>
Vec2<T> cinder::AreaT< T >::getSize (  )  const
template<typename T>
T cinder::AreaT< T >::calcArea (  )  const
template<typename T>
void cinder::AreaT< T >::clipBy ( const AreaT< T > &  clip  ) 
template<typename T>
AreaT< T > cinder::AreaT< T >::getClipBy ( const AreaT< T > &  clip  )  const
template<typename T>
void cinder::AreaT< T >::offsetBy ( const Vec2< T > &  offset  ) 

Translates the AreaT by offset.

template<typename T>
AreaT< T > cinder::AreaT< T >::getOffsetBy ( const Vec2< T > &  offset  )  const

Returns a copy of the AreaT translated by offset.

template<typename T>
void cinder::AreaT< T >::moveULTo ( const Vec2< T > &  newUL  ) 

Translates the AreaT so that its upper-left corner is newUL.

template<typename T>
AreaT< T > cinder::AreaT< T >::getMoveULTo ( const Vec2< T > &  newUL  )  const

Returns a copy of the AreaT translated so that its upper-left corner is newUL.

template<typename T>
void cinder::AreaT< T >::expand ( expandX,
expandY 
)

Expands the AreaT by expandX horizontally and expandY vertically. expandX is subtracted from x1 and added to x2 and expandY is subtracted from y1 and added to y2.

template<typename T>
T cinder::AreaT< T >::getX1 (  )  const
template<typename T>
void cinder::AreaT< T >::setX1 ( aX1  ) 
template<typename T>
T cinder::AreaT< T >::getY1 (  )  const
template<typename T>
void cinder::AreaT< T >::setY1 ( aY1  ) 
template<typename T>
T cinder::AreaT< T >::getX2 (  )  const
template<typename T>
void cinder::AreaT< T >::setX2 ( aX2  ) 
template<typename T>
T cinder::AreaT< T >::getY2 (  )  const
template<typename T>
void cinder::AreaT< T >::setY2 ( aY2  ) 
template<typename T>
Vec2<T> cinder::AreaT< T >::getUL (  )  const
template<typename T>
Vec2<T> cinder::AreaT< T >::getLR (  )  const
template<typename T>
bool cinder::AreaT< T >::isInside ( const Vec2< T > &  offset  )  const
template<typename T>
template<typename Y >
bool cinder::AreaT< T >::isInside ( const Vec2< Y > &  offset  )  const
template<typename T>
bool cinder::AreaT< T >::intersects ( const AreaT< T > &  area  )  const
template<typename T>
bool cinder::AreaT< T >::operator== ( const AreaT< T > &  aArea  )  const
template<typename T>
bool cinder::AreaT< T >::operator< ( const AreaT< T > &  aArea  )  const
template<typename T>
AreaT<T> cinder::AreaT< T >::operator+ ( const Vec2< T > &  offset  )  const
template<typename T>
AreaT< T > cinder::AreaT< T >::proportionalFit ( const AreaT< T > &  srcArea,
const AreaT< T > &  dstArea,
bool  center,
bool  expand = false 
) [static]

Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  o,
const AreaT< T > &  area 
) [friend]

Member Data Documentation

template<typename T>
T cinder::AreaT< T >::x1
template<typename T>
T cinder::AreaT< T >::y1
template<typename T>
T cinder::AreaT< T >::x2
template<typename T>
T cinder::AreaT< T >::y2

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