Karma Engine
Loading...
Searching...
No Matches
KGRect Struct Reference
Collaboration diagram for KGRect:

Public Member Functions

constexpr KGRect (const KGVec2 &min, const KGVec2 &max)
 
constexpr KGRect (const KGVec4 &v)
 
constexpr KGRect (float x1, float y1, float x2, float y2)
 
KGVec2 GetCenter () const
 
KGVec2 GetSize () const
 
float GetWidth () const
 
float GetHeight () const
 
float GetArea () const
 
KGVec2 GetTL () const
 
KGVec2 GetTR () const
 
KGVec2 GetBL () const
 
KGVec2 GetBR () const
 
bool Contains (const KGVec2 &p) const
 
bool Contains (const KGRect &r) const
 
bool Overlaps (const KGRect &r) const
 
void Add (const KGVec2 &p)
 
void Add (const KGRect &r)
 
void Expand (const float amount)
 
void Expand (const KGVec2 &amount)
 
void Translate (const KGVec2 &d)
 
void TranslateX (float dx)
 
void TranslateY (float dy)
 
void ClipWith (const KGRect &r)
 
void ClipWithFull (const KGRect &r)
 
void Floor ()
 
bool IsInverted () const
 
KGVec4 ToVec4 () const
 

Public Attributes

KGVec2 Min
 
KGVec2 Max
 

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