Public Member Functions | List of all members
clan::Rectd Class Reference
clanCore Math

2D (left,top,right,bottom) rectangle structure - Double More...

`#include <rect.h>`

Inheritance diagram for clan::Rectd:

## Public Member Functions
| Rectd ()
| Rectd (const Sizex< int > &s)
| Rectd (const Sizex< float > &s)
| Rectd (const Sizex< double > &s)
| Rectd (double new_left, double new_top, double new_right, double new_bottom)
| Rectd (const Pointx< double > &p, const Sizex< double > &size)
| Rectd (const Rectx< int > &rect)
| Rectd (const Rectx< float > &rect)
| Rectd (const Rectx< double > &rect)
| Rectd (double new_left, double new_top, const Sizex< double > &size)
Public Member Functions inherited from clan::Rectx< double >
Rectx< double > & | set_top_left (const Vec2< double > &p)
| Sets the top-left point of the rectangle. More...
Rectx< double > & | set_width (doublewidth)
| Sets the width of the rectangle. More...
Rectx< double > & | set_height (doubleheight)
| Sets the height of the rectangle. More...
Rectx< double > & | shrink (const double &new_left, const double &new_top, const double &new_right, const double &new_bottom)
| Shrink the rectangle. More...
Rectx< double > & | shrink (const double &left_right, const double &top_bottom)
| Shrink the rectangle. More...
Rectx< double > & | shrink (const double &shrink)
| Shrink the rectangle. More...
Rectx< double > & | expand (const double &expand_left, const double &expand_top, const double &expand_right, const double &expand_bottom)
| Expand the rectangle. More...
Rectx< double > & | expand (const double &left_and_right, const double &top_and_bottom)
| Expand the rectangle. More...
Rectx< double > & | expand (const double &expand)
| Expand the rectangle. More...
Rectx< double > & | translate (const Vec2< double > &p)
| Translate the rect. More...
Rectx< double > & | translate (const Sizex< double > &p)
| Translate the rect. More...
Rectx< double > & | translate (const Rectx< double > &p)
| Translate the rect by another rect (only uses the left and top coords). More...
Rectx< double > & | translate (doublex, doubley)
| Translate the rect. More...
Rectx< double > & | set_size (const Sizex< double > &size)
| Sets the size of the rectangle, maintaining top/left position. More...
Rectx< double > & | overlap (const Rectx< double > &rect)
| Calculates the intersection of two rectangles. More...
Rectx< double > & | bounding_rect (const Rectx< double > &rect)
| Calculates the bounding rectangle of the rectangles. More...
Rectx< double > & | normalize ()
| Normalize rectangle. More...
Rectx< double > & | apply_alignment (Origin origin, doublex, doubley)
| Applies an origin and offset pair to this rectangle. More...
Rectx< double > & | clip (const Rectx< double > &cr)
| Clip according to the specified clip rectangle. More...
double | get_width () const
| Returns the width of the rectangle. More...
double | get_height () const
| Returns the height of the rectangle. More...
Sizex< double > | get_size () const
| Returns the size of the rectangle. More...
bool | contains (const Vec2< double > &p) const
| Returns true if the rectangle contains the point. More...
Pointx< double > | get_top_left () const
| Returns the top-left point inside the rectangle. More...
Pointx< double > | get_top_right () const
| Returns the top-right point outside the rectangle. More...
Pointx< double > | get_bottom_right () const
| Returns the bottom-right point outside the rectangle. More...
Pointx< double > | get_bottom_left () const
| Returns the bottom-left point outside the rectangle. More...
bool | is_overlapped (const Rectx< double > &r) const
| Returns true if rectangle passed is overlapping or inside this rectangle. More...
bool | is_inside (const Rectx< double > &r) const
| Returns true if rectangle passed is inside this rectangle. More...
Rectx< double > | get_rot_bounds (const Vec2< double > &hotspot, const Angle &angle) const
| Returns another Rectx<Type> containing a rotated version of this one. More...
Rectx< double > | get_rot_bounds (Origin origin, doublex, doubley, const Angle &angle) const
| Returns another Rectx<Type> containing a rotated version of this one. More...
Pointx< double > | get_center () const
| Returns the center point of the rectangle. More...
| Rectx ()
| Constructs an rectangle. More...
| Rectx (const Sizex< double > &s)
| Constructs an rectangle. More...
| Rectx (doublenew_left, doublenew_top, doublenew_right, doublenew_bottom)
| Constructs an rectangle. More...
| Rectx (const Pointx< double > &p, const Sizex< double > &size)
| Constructs an rectangle. More...
| Rectx (doublenew_left, doublenew_top, const Sizex< double > &size)
| Constructs an rectangle. More...
| Rectx (const Rectx< int > &rect)
| Constructs an rectangle. More...
| Rectx (const Rectx< float > &rect)
| Constructs an rectangle. More...
| Rectx (const Rectx< double > &rect)
| Constructs an rectangle. More...
bool | operator== (const Rectx< double > &r) const
| Rect == Rect operator. More...
bool | operator!= (const Rectx< double > &r) const
| Rect != Rect operator. More...

## Additional Inherited Members
Static Public Member Functions inherited from clan::Rectx< double >
static Rectx< double > | xywh (doublex, doubley, doublewidth, doubleheight)
static Rectx< double > | ltrb (doubleleft, doubletop, doubleright, doublebottom)
Public Attributes inherited from clan::Rectx< double >
double | left
| X1-coordinate (left point inside the rectangle) More...
double | top
| Y1-coordinate (top point inside the rectangle) More...
double | right
| X2-coordinate (point outside the rectangle) More...
double | bottom
| Y2-coordinate (point outside the rectange) More...

## Detailed Description

2D (left,top,right,bottom) rectangle structure - Double

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

- rect.h