#include <Rect.h>
Public Member Functions | |
| RectT () | |
| RectT (const std::vector< Vec2< T > > &points) | |
| RectT (T aX1, T aY1, T aX2, T aY2) | |
| RectT (const Vec2< T > &v1, const Vec2< T > &v2) | |
| RectT (const Area &area) | |
| void | set (T aX1, T aY1, T aX2, T aY2) |
| T | getWidth () const |
| T | getHeight () const |
| T | getAspectRatio () const |
| T | calcArea () const |
| void | canonicalize () |
| RectT | canonicalized () const |
| void | clipBy (const RectT &clip) |
| RectT | getClipBy (const RectT &clip) const |
| Area | getInteriorArea () const |
| void | offset (const Vec2< T > &offset) |
| RectT | getOffset (const Vec2< T > &off) const |
| void | inflate (const Vec2< T > &amount) |
| RectT | inflated (const Vec2< T > &amount) const |
| void | offsetCenterTo (const Vec2< T > ¢er) |
| Translates the rectangle so that its center is at center. | |
| void | scaleCentered (const Vec2< T > &scale) |
| void | scaleCentered (T scale) |
| RectT | scaledCentered (T scale) const |
| void | scale (T scale) |
| void | scale (const Vec2< T > &scale) |
| RectT | scaled (T scale) const |
| RectT | scaled (const Vec2< T > &scale) const |
| RectT | transformCopy (const class MatrixAffine2< T > &matrix) const |
| Returns a copy of the Rect transformed by matrix. Represents the bounding box of the transformed Rect when matrix expresses non-scale/translate operations. | |
| template<typename Y > | |
| bool | contains (const Vec2< Y > &pt) const |
| Is a point pt inside the rectangle. | |
| bool | intersects (const RectT &rect) const |
| Returns whether rect intersects with this. | |
| T | distance (const Vec2< T > &pt) const |
Returns the distance between the point pt and the rectangle. Points inside the rectangle return 0. | |
| T | distanceSquared (const Vec2< T > &pt) const |
Returns the squared distance between the point pt and the rectangle. Points inside the rectangle return 0. | |
| Vec2< T > | closestPoint (const Vec2< T > &pt) const |
| Returns the nearest point on the Rect rect. Points inside the rectangle return pt. | |
| T | getX1 () const |
| T | getY1 () const |
| T | getX2 () const |
| T | getY2 () const |
| Vec2< T > | getUpperLeft () const |
| Vec2< T > | getUpperRight () const |
| Vec2< T > | getLowerRight () const |
| Vec2< T > | getLowerLeft () const |
| Vec2< T > | getCenter () const |
| Vec2< T > | getSize () const |
| RectT | getCenteredFit (const RectT &other, bool expand) const |
| void | include (const Vec2< T > &point) |
| void | include (const std::vector< Vec2< T > > &points) |
| void | include (const RectT &rect) |
| const RectT< T > | operator+ (const Vec2< T > &o) const |
| const RectT< T > | operator- (const Vec2< T > &o) const |
| const RectT< T > | operator* (T s) const |
| const RectT< T > | operator/ (T s) const |
| const RectT< T > | operator+ (const RectT< T > &rhs) const |
| const RectT< T > | operator- (const RectT< T > &rhs) const |
| RectT< T > & | operator+= (const Vec2< T > &o) |
| RectT< T > & | operator-= (const Vec2< T > &o) |
| RectT< T > & | operator*= (T s) |
| RectT< T > & | operator/= (T s) |
Public Attributes | |
| T | x1 |
| T | y1 |
| T | x2 |
| T | y2 |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const RectT &rect) |
| cinder::RectT< T >::RectT | ( | ) |
| cinder::RectT< T >::RectT | ( | const std::vector< Vec2< T > > & | points | ) |
Initializes the rectangle to be the bounding box of points
| cinder::RectT< T >::RectT | ( | T | aX1, |
| T | aY1, | ||
| T | aX2, | ||
| T | aY2 | ||
| ) |
| cinder::RectT< T >::RectT | ( | const Vec2< T > & | v1, |
| const Vec2< T > & | v2 | ||
| ) |
| cinder::RectT< T >::RectT | ( | const Area & | area | ) |
| void cinder::RectT< T >::set | ( | T | aX1, |
| T | aY1, | ||
| T | aX2, | ||
| T | aY2 | ||
| ) |
| T cinder::RectT< T >::getWidth | ( | ) | const |
| T cinder::RectT< T >::getHeight | ( | ) | const |
| T cinder::RectT< T >::getAspectRatio | ( | ) | const |
| T cinder::RectT< T >::calcArea | ( | ) | const |
| void cinder::RectT< T >::canonicalize | ( | ) |
| RectT< T > cinder::RectT< T >::canonicalized | ( | ) | const |
| void cinder::RectT< T >::clipBy | ( | const RectT< T > & | clip | ) |
| RectT< T > cinder::RectT< T >::getClipBy | ( | const RectT< T > & | clip | ) | const |
| Area cinder::RectT< T >::getInteriorArea | ( | ) | const |
| void cinder::RectT< T >::offset | ( | const Vec2< T > & | offset | ) |
| RectT cinder::RectT< T >::getOffset | ( | const Vec2< T > & | off | ) | const |
| void cinder::RectT< T >::inflate | ( | const Vec2< T > & | amount | ) |
| RectT< T > cinder::RectT< T >::inflated | ( | const Vec2< T > & | amount | ) | const |
| void cinder::RectT< T >::offsetCenterTo | ( | const Vec2< T > & | center | ) |
Translates the rectangle so that its center is at center.
| void cinder::RectT< T >::scaleCentered | ( | const Vec2< T > & | scale | ) |
| void cinder::RectT< T >::scaleCentered | ( | T | scale | ) |
| RectT< T > cinder::RectT< T >::scaledCentered | ( | T | scale | ) | const |
| void cinder::RectT< T >::scale | ( | T | scale | ) |
| void cinder::RectT< T >::scale | ( | const Vec2< T > & | scale | ) |
| RectT< T > cinder::RectT< T >::scaled | ( | T | scale | ) | const |
| RectT< T > cinder::RectT< T >::scaled | ( | const Vec2< T > & | scale | ) | const |
| RectT< T > cinder::RectT< T >::transformCopy | ( | const class MatrixAffine2< T > & | matrix | ) | const |
Returns a copy of the Rect transformed by matrix. Represents the bounding box of the transformed Rect when matrix expresses non-scale/translate operations.
| bool cinder::RectT< T >::contains | ( | const Vec2< Y > & | pt | ) | const |
Is a point pt inside the rectangle.
| bool cinder::RectT< T >::intersects | ( | const RectT< T > & | rect | ) | const |
Returns whether rect intersects with this.
| T cinder::RectT< T >::distance | ( | const Vec2< T > & | pt | ) | const |
Returns the distance between the point pt and the rectangle. Points inside the rectangle return 0.
| T cinder::RectT< T >::distanceSquared | ( | const Vec2< T > & | pt | ) | const |
Returns the squared distance between the point pt and the rectangle. Points inside the rectangle return 0.
| Vec2< T > cinder::RectT< T >::closestPoint | ( | const Vec2< T > & | pt | ) | const |
Returns the nearest point on the Rect rect. Points inside the rectangle return pt.
| T cinder::RectT< T >::getX1 | ( | ) | const |
| T cinder::RectT< T >::getY1 | ( | ) | const |
| T cinder::RectT< T >::getX2 | ( | ) | const |
| T cinder::RectT< T >::getY2 | ( | ) | const |
| Vec2<T> cinder::RectT< T >::getUpperLeft | ( | ) | const |
| Vec2<T> cinder::RectT< T >::getUpperRight | ( | ) | const |
| Vec2<T> cinder::RectT< T >::getLowerRight | ( | ) | const |
| Vec2<T> cinder::RectT< T >::getLowerLeft | ( | ) | const |
| Vec2<T> cinder::RectT< T >::getCenter | ( | ) | const |
| Vec2<T> cinder::RectT< T >::getSize | ( | ) | const |
| RectT< T > cinder::RectT< T >::getCenteredFit | ( | const RectT< T > & | other, |
| bool | expand | ||
| ) | const |
| void cinder::RectT< T >::include | ( | const Vec2< T > & | point | ) |
Expands the Rect to include point in its interior
| void cinder::RectT< T >::include | ( | const std::vector< Vec2< T > > & | points | ) |
Expands the Rect to include all points in points in its interior
| void cinder::RectT< T >::include | ( | const RectT< T > & | rect | ) |
Expands the Rect to include rect in its interior
| const RectT<T> cinder::RectT< T >::operator+ | ( | const Vec2< T > & | o | ) | const |
| const RectT<T> cinder::RectT< T >::operator- | ( | const Vec2< T > & | o | ) | const |
| const RectT<T> cinder::RectT< T >::operator* | ( | T | s | ) | const |
| const RectT<T> cinder::RectT< T >::operator/ | ( | T | s | ) | const |
| const RectT<T> cinder::RectT< T >::operator+ | ( | const RectT< T > & | rhs | ) | const |
| const RectT<T> cinder::RectT< T >::operator- | ( | const RectT< T > & | rhs | ) | const |
| RectT<T>& cinder::RectT< T >::operator+= | ( | const Vec2< T > & | o | ) |
| RectT<T>& cinder::RectT< T >::operator-= | ( | const Vec2< T > & | o | ) |
| RectT<T>& cinder::RectT< T >::operator*= | ( | T | s | ) |
| RectT<T>& cinder::RectT< T >::operator/= | ( | T | s | ) |
| std::ostream& operator<< | ( | std::ostream & | o, |
| const RectT< T > & | rect | ||
| ) | [friend] |
| T cinder::RectT< T >::x1 |
| T cinder::RectT< T >::y1 |
| T cinder::RectT< T >::x2 |
| T cinder::RectT< T >::y2 |