This class represents a 2D rect which can express the size and position of a renderable on screen. More...
#include <unifieddim.h>
Public Member Functions | |
UnifiedRect () | |
Class constructor. | |
UnifiedRect (const UnifiedVec2 &Pos, const UnifiedVec2 &Area) | |
UnifiedVec2 constructor. More... | |
UnifiedRect (const UnifiedDim &PositionX, const UnifiedDim &PositionY, const UnifiedDim &SizeX, const UnifiedDim &SizeY) | |
UnifiedDim constructor. More... | |
UnifiedRect (const Real &PositionXrel, const Real &PositionYrel, const Real &SizeXrel, const Real &SizeYrel) | |
Relative Real constructor. More... | |
UnifiedRect (const Real &PositionXrel, const Real &PositionYrel, const Real &SizeXrel, const Real &SizeYrel, const Real &PositionXabs, const Real &PositionYabs, const Real &SizeXabs, const Real &SizeYabs) | |
Real constructor. More... | |
~UnifiedRect () | |
Class destructor. | |
Rect | CalculateActualDimensions (const Rect &Actual, Boole AsChild=true) const |
Calculates the actual values when a Rect with actual dimensions has this unified rect applied to it. More... | |
Boole | operator!= (const UnifiedRect &Other) const |
Inequality comparison operator. More... | |
UnifiedRect & | operator= (const UnifiedRect &Other) |
Assignment operator. More... | |
Boole | operator== (const UnifiedRect &Other) const |
Equality comparison operator. More... | |
void | ProtoDeSerialize (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite this object with it. More... | |
void | ProtoSerialize (XML::Node &ParentNode) const |
Convert this class to an XML::Node ready for serialization. More... | |
void | SetIdentity () |
Sets all members of this unified rect to zero. | |
void | SetValues (const UnifiedVec2 &Pos, const UnifiedVec2 &Area) |
Sets all data members of this unified rect explicitly. More... | |
void | SetValues (const UnifiedDim &PositionX, const UnifiedDim &PositionY, const UnifiedDim &SizeX, const UnifiedDim &SizeY) |
Sets all data members of this unified rect explicitly. More... | |
void | SetValues (const Real &PositionXrel, const Real &PositionYrel, const Real &SizeXrel, const Real &SizeYrel, const Real &PositionXabs, const Real &PositionYabs, const Real &SizeXabs, const Real &SizeYabs) |
Sets all data members of this unified rect explicitly. More... | |
Static Public Member Functions | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
Public Attributes | |
UnifiedVec2 | Position |
The top left position of this rect. | |
UnifiedVec2 | Size |
The width and height of this rect. | |
This class represents a 2D rect which can express the size and position of a renderable on screen.
Definition at line 661 of file unifieddim.h.
|
inline |
UnifiedVec2 constructor.
Pos | The screen position of the rect. |
Area | The width and height of the rect. |
Definition at line 684 of file unifieddim.h.
|
inline |
UnifiedDim constructor.
PositionX | The position on the X plane. |
PositionY | The position on the Y plane. |
SizeX | The size on the X plane. |
SizeY | The size on the Y plane. |
Definition at line 691 of file unifieddim.h.
|
inline |
Relative Real constructor.
PositionXrel | The relative position portion of the X dimension. |
PositionYrel | The relative position portion of the Y dimension. |
SizeXrel | The relative size portion of the X dimension. |
SizeYrel | The relative size portion of the Y dimension. |
Definition at line 701 of file unifieddim.h.
|
inline |
Real constructor.
PositionXrel | The relative position portion of the X dimension. |
PositionYrel | The relative position portion of the Y dimension. |
SizeXrel | The relative size portion of the X dimension. |
SizeYrel | The relative size portion of the Y dimension. |
PositionXabs | The absolute position portion of the X dimension. |
PositionYabs | the absolute position portion of the Y dimension. |
SizeXabs | The absolute size portion of the X dimension. |
SizeYabs | the absolute size portion of the Y dimension. |
Definition at line 715 of file unifieddim.h.
|
inline |
Calculates the actual values when a Rect with actual dimensions has this unified rect applied to it.
Actual | A Rect containing the actual(pixel) position and size to use as a base for the calculation. |
AsChild | Whether or not the dimensions should be calculated assuming this is a child rect. |
Definition at line 771 of file unifieddim.h.
|
inlinestatic |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.
Definition at line 880 of file unifieddim.h.
|
inline |
Inequality comparison operator.
Other | The other UnifiedRect to compare to. |
Definition at line 791 of file unifieddim.h.
|
inline |
Assignment operator.
Other | The other UnifiedRect to be assign values from. |
Definition at line 802 of file unifieddim.h.
|
inline |
Equality comparison operator.
Other | The other UnifiedRect to compare to. |
Definition at line 784 of file unifieddim.h.
|
inline |
Take the data stored in an XML Node and overwrite this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 835 of file unifieddim.h.
|
inline |
Convert this class to an XML::Node ready for serialization.
ParentNode | The point in the XML hierarchy that all this renderable should be appended to. |
Definition at line 814 of file unifieddim.h.
|
inline |
Sets all data members of this unified rect explicitly.
Pos | The screen position of the rect. |
Area | The width and height of the rect. |
Definition at line 730 of file unifieddim.h.
|
inline |
Sets all data members of this unified rect explicitly.
PositionX | The position on the X plane. |
PositionY | The position on the Y plane. |
SizeX | The size on the X plane. |
SizeY | The size on the Y plane. |
Definition at line 740 of file unifieddim.h.
|
inline |
Sets all data members of this unified rect explicitly.
PositionXrel | The relative position portion of the X dimension. |
PositionYrel | The relative position portion of the Y dimension. |
SizeXrel | The relative size portion of the X dimension. |
SizeYrel | The relative size portion of the Y dimension. |
PositionXabs | The absolute position portion of the X dimension. |
PositionYabs | the absolute position portion of the Y dimension. |
SizeXabs | The absolute size portion of the X dimension. |
SizeYabs | the absolute size portion of the Y dimension. |
Definition at line 754 of file unifieddim.h.