clan::Quad Class Reference - ClanLib SDK
Description: clan::Quad Class Reference

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

2D quad structure - Integer More...

`#include <quad.h>`

Inheritance diagram for clan::Quad:

## Public Member Functions
| Quad ()
| Quad (const Quadx< int > &quad)
| Quad (const Rect &rect)
| Quad (const Vec2< int > &new_p, const Vec2< int > &new_q, const Vec2< int > &new_r, const Vec2< int > &new_s)
Public Member Functions inherited from clan::Quadx< int >
| Quadx ()
| Constructs a quad.
| Quadx (const Quadx< int > &quad)
| Constructs a quad.
| Quadx (const Rectx< int > &rect)
| Constructs a quad.
| Quadx (const Vec2< int > &new_p, const Vec2< int > &new_q, const Vec2< int > &new_r, const Vec2< int > &new_s)
| Constructs a quad.
Quadx< int > & | apply_alignment (Origin origin, int x, int y)
| Applies an origin and offset pair to this rectangle.
Vec2< int > | center () const
| Returns the center point of the quad.
Rect | get_bounds () const
| Returns the bounding box of the quad as a Rect.
int | get_height () const
| Returns the height of the quad.
Sizex< int > | get_size () const
| Returns the size of the rectangle.
int | get_width () const
| Returns the width of the quad.
bool | is_inside (const Vec2< int > &point) const
| Check if a point is inside or outside the quad.
bool | operator!= (const Quadx< int > &quad) const
| Quad != Quad operator.
Quadx< int > | operator+ (const Quadx< int > &quad) const
| Quad + Quad operator.
Quadx< int > | operator+ (const Vec2< int > &point) const
| Quad + Point operator.
Quadx< int > & | operator+= (const Quadx< int > &quad)
| Quad += Quad operator.
Quadx< int > & | operator+= (const Vec2< int > &point)
| Quad += Point operator.
Quadx< int > | operator- (const Quadx< int > &quad) const
| Quad - Quad operator.
Quadx< int > | operator- (const Vec2< int > &point) const
| Quad - Point operator.
Quadx< int > & | operator-= (const Quadx< int > &quad)
| Quad -= Quad operator.
Quadx< int > & | operator-= (const Vec2< int > &point)
| Quad -= Point operator.
bool | operator== (const Quadx< int > &quad) const
| Quad == Quad operator.
Quadx< int > & | rotate (const Vec2< int > &hotspot, const Angle &angle)
| Rotates the Quad.
Quadx< int > & | scale (const Vec2< int > &hotspot, float sx, float sy)
| Scale the Quad.
Quadx< int > & | scale (float sx, float sy)
| Scale the Quad.

## Additional Inherited Members
Public Attributes inherited from clan::Quadx< int >
Vec2< int > | p
| First Point.
Vec2< int > | q
| Second Point.
Vec2< int > | r
| Third Point.
Vec2< int > | s
| Fourth Point.

## Detailed Description

2D quad structure - Integer

## Constructor & Destructor Documentation

## ◆ Quad() [1/4]

clan::Quad::Quad | ( |  | ) |
| inline

## ◆ Quad() [2/4]

clan::Quad::Quad | ( | const Vec2< int > & | new_p,
|  | const Vec2< int > & | new_q,
|  | const Vec2< int > & | new_r,
|  | const Vec2< int > & | new_s )
| inline

## ◆ Quad() [3/4]

clan::Quad::Quad | ( | const Rect & | rect | ) |
| inline

## ◆ Quad() [4/4]

clan::Quad::Quad | ( | const Quadx< int > & | quad | ) |
| inline

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

- quad.h