#include <Area.h>
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) | |
| AreaT (const RectT< float > &r) | |
| void | set (T aX1, T aY1, T aX2, T aY2) |
| T | getWidth () const |
| T | getHeight () const |
| Vec2< T > | getSize () const |
| T | calcArea () const |
| void | clipBy (const AreaT< T > &clip) |
| AreaT< T > | getClipBy (const AreaT< T > &clip) const |
| void | offset (const Vec2< T > &off) |
| Translates the AreaT by off. | |
| AreaT< T > | getOffset (const Vec2< T > &off) const |
| Returns a copy of the AreaT translated by off. | |
| 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. | |
| T | getX1 () const |
| void | setX1 (T aX1) |
| T | getY1 () const |
| void | setY1 (T aY1) |
| T | getX2 () const |
| void | setX2 (T aX2) |
| T | getY2 () const |
| void | setY2 (T aY2) |
| Vec2< T > | getUL () const |
| Vec2< T > | getLR () const |
| bool | contains (const Vec2< T > &offset) const |
| template<typename Y > | |
| bool | contains (const Vec2< Y > &offset) const |
| bool | intersects (const AreaT< T > &area) const |
| template<typename Y > | |
| float | distance (const Vec2< Y > &pt) const |
Returns the distance between the point pt and the rectangle. Points inside the Area return 0. | |
| template<typename Y > | |
| float | distanceSquared (const Vec2< Y > &pt) const |
Returns the squared distance between the point pt and the rectangle. Points inside the rectangle return 0. | |
| template<typename Y > | |
| Vec2< Y > | closestPoint (const Vec2< Y > &pt) const |
| Returns the nearest point on the Rect rect. Points inside the rectangle return pt. | |
| bool | operator== (const AreaT< T > &aArea) const |
| bool | operator< (const AreaT< T > &aArea) const |
| const AreaT< T > | operator+ (const Vec2< T > &o) const |
| const AreaT< T > | operator- (const Vec2< T > &o) const |
| AreaT< T > & | operator+= (const Vec2< T > &o) |
| AreaT< T > & | operator-= (const Vec2< T > &o) |
| 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 | |
| T | x1 |
| T | y1 |
| T | x2 |
| T | y2 |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const AreaT< T > &area) |
| cinder::AreaT< T >::AreaT | ( | ) |
| cinder::AreaT< T >::AreaT | ( | const Vec2< T > & | UL, | |
| const Vec2< T > & | LR | |||
| ) |
| cinder::AreaT< T >::AreaT | ( | T | aX1, | |
| T | aY1, | |||
| T | aX2, | |||
| T | aY2 | |||
| ) |
| cinder::AreaT< T >::AreaT | ( | const AreaT< Y > & | aAreaBase | ) | [explicit] |
| cinder::AreaT< T >::AreaT | ( | const RectT< float > & | r | ) | [explicit] |
| cinder::AreaT< int32_t >::AreaT | ( | const AreaT< boost::rational< int32_t > > & | aAreaBase | ) |
| cinder::AreaT< boost::rational< int32_t > >::AreaT | ( | const AreaT< int32_t > & | aAreaBase | ) |
| void cinder::AreaT< T >::set | ( | T | aX1, | |
| T | aY1, | |||
| T | aX2, | |||
| T | aY2 | |||
| ) |
| T cinder::AreaT< T >::getWidth | ( | ) | const |
| T cinder::AreaT< T >::getHeight | ( | ) | const |
| Vec2<T> cinder::AreaT< T >::getSize | ( | ) | const |
| T cinder::AreaT< T >::calcArea | ( | ) | const |
| void cinder::AreaT< T >::clipBy | ( | const AreaT< T > & | clip | ) |
| AreaT< T > cinder::AreaT< T >::getClipBy | ( | const AreaT< T > & | clip | ) | const |
| void cinder::AreaT< T >::offset | ( | const Vec2< T > & | off | ) |
Translates the AreaT by off.
| AreaT< T > cinder::AreaT< T >::getOffset | ( | const Vec2< T > & | off | ) | const |
Returns a copy of the AreaT translated by off.
| void cinder::AreaT< T >::moveULTo | ( | const Vec2< T > & | newUL | ) |
Translates the AreaT so that its upper-left corner is newUL.
| 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.
| void cinder::AreaT< T >::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.
| T cinder::AreaT< T >::getX1 | ( | ) | const |
| void cinder::AreaT< T >::setX1 | ( | T | aX1 | ) |
| T cinder::AreaT< T >::getY1 | ( | ) | const |
| void cinder::AreaT< T >::setY1 | ( | T | aY1 | ) |
| T cinder::AreaT< T >::getX2 | ( | ) | const |
| void cinder::AreaT< T >::setX2 | ( | T | aX2 | ) |
| T cinder::AreaT< T >::getY2 | ( | ) | const |
| void cinder::AreaT< T >::setY2 | ( | T | aY2 | ) |
| Vec2<T> cinder::AreaT< T >::getUL | ( | ) | const |
| Vec2<T> cinder::AreaT< T >::getLR | ( | ) | const |
| bool cinder::AreaT< T >::contains | ( | const Vec2< T > & | offset | ) | const |
| bool cinder::AreaT< T >::contains | ( | const Vec2< Y > & | offset | ) | const |
| bool cinder::AreaT< T >::intersects | ( | const AreaT< T > & | area | ) | const |
| float cinder::AreaT< T >::distance | ( | const Vec2< Y > & | pt | ) | const |
Returns the distance between the point pt and the rectangle. Points inside the Area return 0.
| float cinder::AreaT< T >::distanceSquared | ( | const Vec2< Y > & | pt | ) | const |
Returns the squared distance between the point pt and the rectangle. Points inside the rectangle return 0.
| Vec2< Y > cinder::AreaT< T >::closestPoint | ( | const Vec2< Y > & | pt | ) | const |
Returns the nearest point on the Rect rect. Points inside the rectangle return pt.
| bool cinder::AreaT< T >::operator== | ( | const AreaT< T > & | aArea | ) | const |
| bool cinder::AreaT< T >::operator< | ( | const AreaT< T > & | aArea | ) | const |
| const AreaT<T> cinder::AreaT< T >::operator+ | ( | const Vec2< T > & | o | ) | const |
| const AreaT<T> cinder::AreaT< T >::operator- | ( | const Vec2< T > & | o | ) | const |
| AreaT<T>& cinder::AreaT< T >::operator+= | ( | const Vec2< T > & | o | ) |
| AreaT<T>& cinder::AreaT< T >::operator-= | ( | const Vec2< T > & | o | ) |
| AreaT< T > cinder::AreaT< T >::proportionalFit | ( | const AreaT< T > & | srcArea, | |
| const AreaT< T > & | dstArea, | |||
| bool | center, | |||
| bool | expand = false | |||
| ) | [static] |
| std::ostream& operator<< | ( | std::ostream & | o, | |
| const AreaT< T > & | area | |||
| ) | [friend] |
| T cinder::AreaT< T >::x1 |
| T cinder::AreaT< T >::y1 |
| T cinder::AreaT< T >::x2 |
| T cinder::AreaT< T >::y2 |