Public Member Functions

CL_Quad Class Reference
[clanCore Math]

2D quad structure - Integer More...

#include <quad.h>

Inheritance diagram for CL_Quad:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CL_Quad ()
 CL_Quad (const CL_Quadx< int > &quad)
 CL_Quad (const CL_Rect &rect)
 CL_Quad (const CL_Vec2< int > &new_p, const CL_Vec2< int > &new_q, const CL_Vec2< int > &new_r, const CL_Vec2< int > &new_s)
Construction

CL_Quadx< int > & operator+= (const CL_Quadx< int > &quad)
 Quad += Quad operator.
CL_Quadx< int > & operator+= (const CL_Vec2< int > &point)
 Quad += Point operator.
CL_Quadx< int > & operator-= (const CL_Quadx< int > &quad)
 Quad -= Quad operator.
CL_Quadx< int > & operator-= (const CL_Vec2< int > &point)
 Quad -= Point operator.
CL_Quadx< int > operator+ (const CL_Quadx< int > &quad) const
 Quad + Quad operator.
CL_Quadx< int > operator+ (const CL_Vec2< int > &point) const
 Quad + Point operator.
CL_Quadx< int > operator- (const CL_Quadx< int > &quad) const
 Quad - Quad operator.
CL_Quadx< int > operator- (const CL_Vec2< int > &point) const
 Quad - Point operator.
bool operator== (const CL_Quadx< int > &quad) const
 Quad == Quad operator.
bool operator!= (const CL_Quadx< int > &quad) const
 Quad != Quad operator.
Operations

CL_Quadx< int > & rotate (const CL_Vec2< int > &hotspot, const CL_Angle &angle)
 Rotates the Quad.
CL_Quadx< int > & scale (float sx, float sy)
 Scale the Quad.
CL_Quadx< int > & scale (const CL_Vec2< int > &hotspot, float sx, float sy)
 Scale the Quad.
CL_Vec2< int > center () const
 Returns the center point of the quad.
CL_Quadx< int > & apply_alignment (CL_Origin origin, intx, inty)
 Applies an origin and offset pair to this rectangle.

Attributes



int get_width () const
 Returns the width of the quad.
int get_height () const
 Returns the height of the quad.
CL_Sizex< int > 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< int > p
 First Point.
CL_Vec2< int > q
 Second Point.
CL_Vec2< int > r
 Third Point.
CL_Vec2< int > s
 Fourth Point.

Detailed Description

2D quad structure - Integer


Constructor & Destructor Documentation

CL_Quad::CL_Quad (  )  [inline]
CL_Quad::CL_Quad ( const CL_Vec2< int > &  new_p,
const CL_Vec2< int > &  new_q,
const CL_Vec2< int > &  new_r,
const CL_Vec2< int > &  new_s 
) [inline]
CL_Quad::CL_Quad ( const CL_Rect rect  )  [inline]
CL_Quad::CL_Quad ( const CL_Quadx< int > &  quad  )  [inline]

Member Function Documentation

CL_Quadx<int >& CL_Quadx< int >::apply_alignment ( CL_Origin  origin,
int  x,
int  y 
) [inherited]

Applies an origin and offset pair to this rectangle.

Parameters:
origin The new origin to adjust to from default upper-left position
x,y Offsets applied negatively to each corner of the rectangle
Returns:
reference to this object
CL_Vec2<int > CL_Quadx< int >::center (  )  const [inherited]

Returns the center point of the quad.

CL_Rect CL_Quadx< int >::get_bounds (  )  const [inherited]

Returns the bounding box of the quad as a CL_Rect.

int CL_Quadx< int >::get_height (  )  const [inherited]

Returns the height of the quad.

CL_Sizex<int > CL_Quadx< int >::get_size (  )  const [inline, inherited]

Returns the size of the rectangle.

int CL_Quadx< int >::get_width (  )  const [inherited]

Returns the width of the quad.

bool CL_Quadx< int >::operator!= ( const CL_Quadx< int > &  quad  )  const [inline, inherited]
CL_Quadx<int > CL_Quadx< int >::operator+ ( const CL_Quadx< int > &  quad  )  const [inline, inherited]
CL_Quadx<int > CL_Quadx< int >::operator+ ( const CL_Vec2< int > &  point  )  const [inline, inherited]

Quad + Point operator.

CL_Quadx<int >& CL_Quadx< int >::operator+= ( const CL_Vec2< int > &  point  )  [inline, inherited]

Quad += Point operator.

CL_Quadx<int >& CL_Quadx< int >::operator+= ( const CL_Quadx< int > &  quad  )  [inline, inherited]
CL_Quadx<int > CL_Quadx< int >::operator- ( const CL_Vec2< int > &  point  )  const [inline, inherited]

Quad - Point operator.

CL_Quadx<int > CL_Quadx< int >::operator- ( const CL_Quadx< int > &  quad  )  const [inline, inherited]
CL_Quadx<int >& CL_Quadx< int >::operator-= ( const CL_Vec2< int > &  point  )  [inline, inherited]

Quad -= Point operator.

CL_Quadx<int >& CL_Quadx< int >::operator-= ( const CL_Quadx< int > &  quad  )  [inline, inherited]
bool CL_Quadx< int >::operator== ( const CL_Quadx< int > &  quad  )  const [inline, inherited]
CL_Quadx<int >& CL_Quadx< int >::rotate ( const CL_Vec2< int > &  hotspot,
const CL_Angle angle 
) [inherited]

Rotates the Quad.

Parameters:
hotspot Point to rotate around.
angle Angle to rotate in degrees.
Returns:
reference to this object
CL_Quadx<int >& CL_Quadx< int >::scale ( const CL_Vec2< int > &  hotspot,
float  sx,
float  sy 
) [inherited]

Scale the Quad.

Parameters:
sx = Scale value in x-axis
sy = Scale value in y-axis
hotspot = Point to scale around.
Returns:
reference to this object
CL_Quadx<int >& CL_Quadx< int >::scale ( float  sx,
float  sy 
) [inherited]

Scale the Quad.

Parameters:
sx = Scale value in x-axis
sy = Scale value in y-axis
Returns:
reference to this object

Member Data Documentation

CL_Vec2<int > CL_Quadx< int >::p [inherited]

First Point.

CL_Vec2<int > CL_Quadx< int >::q [inherited]

Second Point.

CL_Vec2<int > CL_Quadx< int >::r [inherited]

Third Point.

CL_Vec2<int > CL_Quadx< int >::s [inherited]

Fourth Point.


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