2D quad structure. More...
#include <quad.h>
Public Member Functions | |
Construction | |
Quadx () | |
Constructs a quad. More... | |
Quadx (const Vec2< Type > &new_p, const Vec2< Type > &new_q, const Vec2< Type > &new_r, const Vec2< Type > &new_s) | |
Constructs a quad. More... | |
Quadx (const Rectx< Type > &rect) | |
Constructs a quad. More... | |
Quadx (const Quadx< Type > &quad) | |
Constructs a quad. More... | |
Quadx< Type > & | operator+= (const Quadx< Type > &quad) |
Quad += Quad operator. More... | |
Quadx< Type > & | operator-= (const Quadx< Type > &quad) |
Quad -= Quad operator. More... | |
Quadx< Type > & | operator+= (const Vec2< Type > &point) |
Quad += Point operator. More... | |
Quadx< Type > & | operator-= (const Vec2< Type > &point) |
Quad -= Point operator. More... | |
Quadx< Type > | operator+ (const Quadx< Type > &quad) const |
Quad + Quad operator. More... | |
Quadx< Type > | operator- (const Quadx< Type > &quad) const |
Quad - Quad operator. More... | |
Quadx< Type > | operator+ (const Vec2< Type > &point) const |
Quad + Point operator. More... | |
Quadx< Type > | operator- (const Vec2< Type > &point) const |
Quad - Point operator. More... | |
bool | operator== (const Quadx< Type > &quad) const |
Quad == Quad operator. More... | |
bool | operator!= (const Quadx< Type > &quad) const |
Quad != Quad operator. More... | |
Operations | |
Quadx< Type > & | rotate (const Vec2< Type > &hotspot, const Angle &angle) |
Rotates the Quad. More... | |
Quadx< Type > & | scale (float sx, float sy) |
Scale the Quad. More... | |
Quadx< Type > & | scale (const Vec2< Type > &hotspot, float sx, float sy) |
Scale the Quad. More... | |
Vec2< Type > | center () const |
Returns the center point of the quad. More... | |
Quadx< Type > & | apply_alignment (Origin origin, Type x, Type y) |
Applies an origin and offset pair to this rectangle. More... | |
bool | is_inside (const Vec2< Type > &point) const |
Check if a point is inside or outside the quad. More... | |
Attributes | |
Vec2< Type > | p |
First Point. More... | |
Vec2< Type > | q |
Second Point. More... | |
Vec2< Type > | r |
Third Point. More... | |
Vec2< Type > | s |
Fourth Point. More... | |
Type | get_width () const |
Returns the width of the quad. More... | |
Type | get_height () const |
Returns the height of the quad. More... | |
Sizex< Type > | get_size () const |
Returns the size of the rectangle. More... | |
Rect | get_bounds () const |
Returns the bounding box of the quad as a Rect. More... | |
2D quad structure.
These quads templates are defined for: int (Quad), float (Quadf), double (Quadd)