Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
RectClass Class Reference

#include <rect.h>

Public Member Functions

 RectClass (void)
 
 RectClass (const RectClass &r)
 
 RectClass (float left, float top, float right, float bottom)
 
 RectClass (const Vector2 &top_left, const Vector2 &bottom_right)
 
RectClassoperator= (const RectClass &r)
 
void Set (float left, float top, float right, float bottom)
 
void Set (const Vector2 &top_left, const Vector2 &bottom_right)
 
void Set (const RectClass &r)
 
float Width (void) const
 
float Height (void) const
 
Vector2 Center (void) const
 
Vector2 Extent (void) const
 
Vector2 Upper_Left (void) const
 
Vector2 Lower_Right (void) const
 
Vector2 Upper_Right (void) const
 
Vector2 Lower_Left (void) const
 
RectClassoperator*= (float k)
 
RectClassoperator/= (float k)
 
RectClassScale_Relative_Center (float k)
 
RectClassScale (float k)
 
RectClassScale (const Vector2 &k)
 
RectClassInverse_Scale (const Vector2 &k)
 
RectClassoperator+= (const Vector2 &o)
 
RectClassoperator-= (const Vector2 &o)
 
void Inflate (const Vector2 &o)
 
RectClassoperator+= (const RectClass &r)
 
bool operator== (const RectClass &rval) const
 
bool operator!= (const RectClass &rval) const
 
bool Contains (const Vector2 &pos) const
 
void Snap_To_Units (const Vector2 &u)
 

Public Attributes

float Left
 
float Top
 
float Right
 
float Bottom
 

Detailed Description

Definition at line 47 of file rect.h.

Constructor & Destructor Documentation

◆ RectClass() [1/4]

RectClass::RectClass ( void )
inline

Definition at line 56 of file rect.h.

◆ RectClass() [2/4]

RectClass::RectClass ( const RectClass & r)
inline

Definition at line 57 of file rect.h.

◆ RectClass() [3/4]

RectClass::RectClass ( float left,
float top,
float right,
float bottom )
inline

Definition at line 58 of file rect.h.

◆ RectClass() [4/4]

RectClass::RectClass ( const Vector2 & top_left,
const Vector2 & bottom_right )
inline

Definition at line 59 of file rect.h.

Member Function Documentation

◆ Center()

Vector2 RectClass::Center ( void ) const
inline

Definition at line 70 of file rect.h.

◆ Contains()

bool RectClass::Contains ( const Vector2 & pos) const
inline

Definition at line 100 of file rect.h.

◆ Extent()

Vector2 RectClass::Extent ( void ) const
inline

Definition at line 71 of file rect.h.

◆ Height()

float RectClass::Height ( void ) const
inline

Definition at line 69 of file rect.h.

◆ Inflate()

void RectClass::Inflate ( const Vector2 & o)
inline

Definition at line 90 of file rect.h.

◆ Inverse_Scale()

RectClass & RectClass::Inverse_Scale ( const Vector2 & k)
inline

Definition at line 83 of file rect.h.

◆ Lower_Left()

Vector2 RectClass::Lower_Left ( void ) const
inline

Definition at line 75 of file rect.h.

◆ Lower_Right()

Vector2 RectClass::Lower_Right ( void ) const
inline

Definition at line 73 of file rect.h.

◆ operator!=()

bool RectClass::operator!= ( const RectClass & rval) const
inline

Definition at line 97 of file rect.h.

◆ operator*=()

RectClass & RectClass::operator*= ( float k)
inline

Definition at line 78 of file rect.h.

◆ operator+=() [1/2]

RectClass & RectClass::operator+= ( const RectClass & r)
inline

Definition at line 93 of file rect.h.

◆ operator+=() [2/2]

RectClass & RectClass::operator+= ( const Vector2 & o)
inline

Definition at line 86 of file rect.h.

◆ operator-=()

RectClass & RectClass::operator-= ( const Vector2 & o)
inline

Definition at line 87 of file rect.h.

◆ operator/=()

RectClass & RectClass::operator/= ( float k)
inline

Definition at line 79 of file rect.h.

◆ operator=()

RectClass & RectClass::operator= ( const RectClass & r)
inline

Definition at line 62 of file rect.h.

◆ operator==()

bool RectClass::operator== ( const RectClass & rval) const
inline

Definition at line 96 of file rect.h.

◆ Scale() [1/2]

RectClass & RectClass::Scale ( const Vector2 & k)
inline

Definition at line 82 of file rect.h.

◆ Scale() [2/2]

RectClass & RectClass::Scale ( float k)
inline

Definition at line 81 of file rect.h.

◆ Scale_Relative_Center()

RectClass & RectClass::Scale_Relative_Center ( float k)
inline

Definition at line 80 of file rect.h.

◆ Set() [1/3]

void RectClass::Set ( const RectClass & r)
inline

Definition at line 65 of file rect.h.

◆ Set() [2/3]

void RectClass::Set ( const Vector2 & top_left,
const Vector2 & bottom_right )
inline

Definition at line 64 of file rect.h.

◆ Set() [3/3]

void RectClass::Set ( float left,
float top,
float right,
float bottom )
inline

Definition at line 63 of file rect.h.

◆ Snap_To_Units()

void RectClass::Snap_To_Units ( const Vector2 & u)
inline

Definition at line 103 of file rect.h.

◆ Upper_Left()

Vector2 RectClass::Upper_Left ( void ) const
inline

Definition at line 72 of file rect.h.

◆ Upper_Right()

Vector2 RectClass::Upper_Right ( void ) const
inline

Definition at line 74 of file rect.h.

◆ Width()

float RectClass::Width ( void ) const
inline

Definition at line 68 of file rect.h.

Member Data Documentation

◆ Bottom

float RectClass::Bottom

Definition at line 53 of file rect.h.

◆ Left

float RectClass::Left

Definition at line 50 of file rect.h.

◆ Right

float RectClass::Right

Definition at line 52 of file rect.h.

◆ Top

float RectClass::Top

Definition at line 51 of file rect.h.


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