18 Size2D(
int _w,
int _h) : m_w(_w), m_h(_h) {};
19 Size2D(
const Size2D& _other) : m_w(_other.m_w), m_h(_other.m_h) {};
22 Size2D& operator = (
const Size2D& _other) { m_w = _other.m_w; m_h = _other.m_h;
return *
this; };
23 bool operator == (
const Size2D& _other)
const {
return m_w == _other.m_w && m_h == _other.m_h; };
24 bool operator != (
const Size2D& _other)
const {
return m_w != _other.m_w || m_h != _other.m_h; };
34 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
37 bool isValid(
void)
const {
return m_w >= 0 && m_h >= 0; };
44 int width(
void)
const {
return m_w; };
51 int height(
void)
const {
return m_h; };
68 Size2DF(
float _w,
float _h) : m_w(_w), m_h(_h) {};
72 Size2DF& operator = (
const Size2DF& _other) { m_w = _other.m_w; m_h = _other.m_h;
return *
this; };
73 bool operator == (
const Size2DF& _other)
const {
return m_w == _other.m_w && m_h == _other.m_h; };
74 bool operator != (
const Size2DF& _other)
const {
return m_w != _other.m_w || m_h != _other.m_h; };
84 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
87 bool isValid(
void)
const {
return m_w >= 0.f && m_h >= 0.f; };
94 float width(
void)
const {
return m_w; };
101 float height(
void)
const {
return m_h; };
118 Size2DD(
double _w,
double _h) : m_w(_w), m_h(_h) {};
122 Size2DD& operator = (
const Size2DD& _other) { m_w = _other.m_w; m_h = _other.m_h;
return *
this; };
124 bool operator != (
const Size2DD& _other)
const {
return m_w != _other.m_w || m_h != _other.m_h; };
134 virtual void setFromJsonObject(
const ConstJsonObject& _object)
override;
137 bool isValid(
void)
const {
return m_w >= 0. && m_h >= 0.; };
144 double width(
void)
const {
return m_w; };
151 double height(
void)
const {
return m_h; };
#define OT_CORE_API_EXPORTONLY
Definition CoreAPIExport.h:11
bool operator==(const FaceSelection &left, const FaceSelection &right)
Definition Model.cpp:55
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
2D Size with double values
Definition Size2D.h:115
Size2DD()
Definition Size2D.h:117
void setHeight(double _h)
Set height.
Definition Size2D.h:148
Size2DD(const Size2DD &_other)
Definition Size2D.h:119
virtual ~Size2DD()
Definition Size2D.h:120
bool isValid(void) const
Returns true if the width and height are greater or equal 0.
Definition Size2D.h:137
double height(void) const
Return the height.
Definition Size2D.h:151
double width(void) const
Return the width.
Definition Size2D.h:144
Size2DD(double _w, double _h)
Definition Size2D.h:118
void setWidth(double _w)
Set width.
Definition Size2D.h:141
2D Size with float values
Definition Size2D.h:65
virtual ~Size2DF()
Definition Size2D.h:70
void setWidth(float _w)
Set width.
Definition Size2D.h:91
float width(void) const
Return the width.
Definition Size2D.h:94
bool isValid(void) const
Returns true if the width and height are greater or equal 0.
Definition Size2D.h:87
float height(void) const
Return the height.
Definition Size2D.h:101
Size2DF(float _w, float _h)
Definition Size2D.h:68
void setHeight(float _h)
Set height.
Definition Size2D.h:98
Size2DF(const Size2DF &_other)
Definition Size2D.h:69
Size2DF()
Definition Size2D.h:67
2D Size with integer values
Definition Size2D.h:15
int height(void) const
Return the height.
Definition Size2D.h:51
void setHeight(int _h)
Set height.
Definition Size2D.h:48
int width(void) const
Return the width.
Definition Size2D.h:44
Size2D(const Size2D &_other)
Definition Size2D.h:19
Size2D()
Definition Size2D.h:17
void setWidth(int _w)
Set width.
Definition Size2D.h:41
Size2D(int _w, int _h)
Definition Size2D.h:18
bool isValid(void) const
Returns true if the width and height are greater or equal 0.
Definition Size2D.h:37
virtual ~Size2D()
Definition Size2D.h:20
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30