2D quad structure - Double More...
#include <quad.h>
Public Member Functions | |
CL_Quadd () | |
CL_Quadd (const CL_Quadx< double > &quad) | |
CL_Quadd (const CL_Rectd &rect) | |
CL_Quadd (const CL_Vec2< double > &new_p, const CL_Vec2< double > &new_q, const CL_Vec2< double > &new_r, const CL_Vec2< double > &new_s) | |
Construction | |
CL_Quadx< double > & | operator+= (const CL_Quadx< double > &quad) |
Quad += Quad operator. | |
CL_Quadx< double > & | operator+= (const CL_Vec2< double > &point) |
Quad += Point operator. | |
CL_Quadx< double > & | operator-= (const CL_Quadx< double > &quad) |
Quad -= Quad operator. | |
CL_Quadx< double > & | operator-= (const CL_Vec2< double > &point) |
Quad -= Point operator. | |
CL_Quadx< double > | operator+ (const CL_Quadx< double > &quad) const |
Quad + Quad operator. | |
CL_Quadx< double > | operator+ (const CL_Vec2< double > &point) const |
Quad + Point operator. | |
CL_Quadx< double > | operator- (const CL_Quadx< double > &quad) const |
Quad - Quad operator. | |
CL_Quadx< double > | operator- (const CL_Vec2< double > &point) const |
Quad - Point operator. | |
bool | operator== (const CL_Quadx< double > &quad) const |
Quad == Quad operator. | |
bool | operator!= (const CL_Quadx< double > &quad) const |
Quad != Quad operator. | |
Operations | |
CL_Quadx< double > & | rotate (const CL_Vec2< double > &hotspot, const CL_Angle &angle) |
Rotates the Quad. | |
CL_Quadx< double > & | scale (float sx, float sy) |
Scale the Quad. | |
CL_Quadx< double > & | scale (const CL_Vec2< double > &hotspot, float sx, float sy) |
Scale the Quad. | |
CL_Vec2< double > | center () const |
Returns the center point of the quad. | |
CL_Quadx< double > & | apply_alignment (CL_Origin origin, doublex, doubley) |
Applies an origin and offset pair to this rectangle. | |
Attributes | |
| |
double | get_width () const |
Returns the width of the quad. | |
double | get_height () const |
Returns the height of the quad. | |
CL_Sizex< double > | get_size () const |
Returns the size of the rectangle. | |
CL_Rect | get_bounds () const |
Returns the bounding box of the quad as a CL_Rect. | |
CL_Vec2< double > | p |
First Point. | |
CL_Vec2< double > | q |
Second Point. | |
CL_Vec2< double > | r |
Third Point. | |
CL_Vec2< double > | s |
Fourth Point. |
2D quad structure - Double
CL_Quadd::CL_Quadd | ( | ) | [inline] |
CL_Quadd::CL_Quadd | ( | const CL_Vec2< double > & | new_p, | |
const CL_Vec2< double > & | new_q, | |||
const CL_Vec2< double > & | new_r, | |||
const CL_Vec2< double > & | new_s | |||
) | [inline] |
CL_Quadd::CL_Quadd | ( | const CL_Rectd & | rect | ) | [inline] |
CL_Quadd::CL_Quadd | ( | const CL_Quadx< double > & | quad | ) | [inline] |
CL_Quadx<double >& CL_Quadx< double >::apply_alignment | ( | CL_Origin | origin, | |
double | x, | |||
double | y | |||
) | [inherited] |
Applies an origin and offset pair to this rectangle.
origin | The new origin to adjust to from default upper-left position | |
x,y | Offsets applied negatively to each corner of the rectangle |
Returns the center point of the quad.
Returns the bounding box of the quad as a CL_Rect.
double CL_Quadx< double >::get_height | ( | ) | const [inherited] |
Returns the height of the quad.
Returns the size of the rectangle.
double CL_Quadx< double >::get_width | ( | ) | const [inherited] |
Returns the width of the quad.
Quad != Quad operator.
CL_Quadx<double > CL_Quadx< double >::operator+ | ( | const CL_Quadx< double > & | quad | ) | const [inline, inherited] |
Quad + Quad operator.
CL_Quadx<double > CL_Quadx< double >::operator+ | ( | const CL_Vec2< double > & | point | ) | const [inline, inherited] |
Quad + Point operator.
CL_Quadx<double >& CL_Quadx< double >::operator+= | ( | const CL_Vec2< double > & | point | ) | [inline, inherited] |
Quad += Point operator.
CL_Quadx<double >& CL_Quadx< double >::operator+= | ( | const CL_Quadx< double > & | quad | ) | [inline, inherited] |
Quad += Quad operator.
CL_Quadx<double > CL_Quadx< double >::operator- | ( | const CL_Vec2< double > & | point | ) | const [inline, inherited] |
Quad - Point operator.
CL_Quadx<double > CL_Quadx< double >::operator- | ( | const CL_Quadx< double > & | quad | ) | const [inline, inherited] |
Quad - Quad operator.
CL_Quadx<double >& CL_Quadx< double >::operator-= | ( | const CL_Vec2< double > & | point | ) | [inline, inherited] |
Quad -= Point operator.
CL_Quadx<double >& CL_Quadx< double >::operator-= | ( | const CL_Quadx< double > & | quad | ) | [inline, inherited] |
Quad -= Quad operator.
Quad == Quad operator.
CL_Quadx<double >& CL_Quadx< double >::rotate | ( | const CL_Vec2< double > & | hotspot, | |
const CL_Angle & | angle | |||
) | [inherited] |
Rotates the Quad.
hotspot | Point to rotate around. | |
angle | Angle to rotate in degrees. |
CL_Quadx<double >& CL_Quadx< double >::scale | ( | const CL_Vec2< double > & | hotspot, | |
float | sx, | |||
float | sy | |||
) | [inherited] |
Scale the Quad.
sx | = Scale value in x-axis | |
sy | = Scale value in y-axis | |
hotspot | = Point to scale around. |
Scale the Quad.
sx | = Scale value in x-axis | |
sy | = Scale value in y-axis |