Lysa  0.0
Lysa 3D Engine
Rect Struct Reference

Detailed Description

Define a rectangular area with a bottom-left origin

Public Member Functions

bool contains (const float X, const float Y) const
 
bool contains (const Rect &R) const
 
Rect & operator= (const Rect &R) = default
 
bool operator== (const Rect &R) const
 
void intersect (const Rect &A, const Rect &B)
 

Public Attributes

float x {0.0f}
 
float y {0.0f}
 
float width {0.0f}
 
float height {0.0f}
 

Member Function Documentation

bool contains ( const float  X,
const float  Y 
) const
inline

Returns true if the given point is inside the rect

bool contains ( const Rect &  R) const
inline

Returns true if the given rect is inside the rect

void intersect ( const Rect &  A,
const Rect &  B 
)
inline

The rect is the result of the intersection between two rects

Rect& operator= ( const Rect &  R)
inlinedefault
bool operator== ( const Rect &  R) const
inline

Member Data Documentation

float height {0.0f}

Height

float width {0.0f}

Width

float x {0.0f}

Bottom-Left corner X position

float y {0.0f}

Bottom-Left corner Y position