Ember
Loading...
Searching...
No Matches
EmberCore::Rect Struct Reference

2D rectangle with position and size More...

#include <Geometry.h>

Public Member Functions

 Rect ()=default
 Rect (int x, int y, int width, int height)
 Rect (const Point &position, const Size &size)
bool operator== (const Rect &other) const
bool operator!= (const Rect &other) const
Point GetPosition () const
Size GetSize () const
void SetPosition (const Point &position)
void SetSize (const Size &size)
bool IsEmpty () const
bool Contains (const Point &point) const
bool Contains (const Rect &rect) const

Public Attributes

int x = 0
int y = 0
int width = 0
int height = 0

Detailed Description

2D rectangle with position and size

Definition at line 40 of file Geometry.h.

Constructor & Destructor Documentation

◆ Rect() [1/3]

EmberCore::Rect::Rect ( )
default

◆ Rect() [2/3]

EmberCore::Rect::Rect ( int x,
int y,
int width,
int height )
inline

Definition at line 47 of file Geometry.h.

◆ Rect() [3/3]

EmberCore::Rect::Rect ( const Point & position,
const Size & size )
inline

Definition at line 48 of file Geometry.h.

Member Function Documentation

◆ Contains() [1/2]

bool EmberCore::Rect::Contains ( const Point & point) const
inline

Definition at line 72 of file Geometry.h.

◆ Contains() [2/2]

bool EmberCore::Rect::Contains ( const Rect & rect) const
inline

Definition at line 76 of file Geometry.h.

◆ GetPosition()

Point EmberCore::Rect::GetPosition ( ) const
inline

Definition at line 57 of file Geometry.h.

◆ GetSize()

Size EmberCore::Rect::GetSize ( ) const
inline

Definition at line 58 of file Geometry.h.

◆ IsEmpty()

bool EmberCore::Rect::IsEmpty ( ) const
inline

Definition at line 70 of file Geometry.h.

◆ operator!=()

bool EmberCore::Rect::operator!= ( const Rect & other) const
inline

Definition at line 55 of file Geometry.h.

◆ operator==()

bool EmberCore::Rect::operator== ( const Rect & other) const
inline

Definition at line 51 of file Geometry.h.

◆ SetPosition()

void EmberCore::Rect::SetPosition ( const Point & position)
inline

Definition at line 60 of file Geometry.h.

◆ SetSize()

void EmberCore::Rect::SetSize ( const Size & size)
inline

Definition at line 65 of file Geometry.h.

Member Data Documentation

◆ height

int EmberCore::Rect::height = 0

Definition at line 44 of file Geometry.h.

◆ width

int EmberCore::Rect::width = 0

Definition at line 43 of file Geometry.h.

◆ x

int EmberCore::Rect::x = 0

Definition at line 41 of file Geometry.h.

◆ y

int EmberCore::Rect::y = 0

Definition at line 42 of file Geometry.h.


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