A size, which has width and height, could be used to represent the size in 2D. More...
Public Member Functions | |
operator Vec2 () const | |
Conversion from Vec2 to Size. | |
Size () | |
Constructor. | |
Size () | |
Constructor. | |
Size () | |
Constructor. | |
Size (float width, float height) | |
Constructor. More... | |
Size ( var width, var height) | |
Constructor. More... | |
Size ( local width, local height) | |
Constructor. More... | |
Size (const Size &other) | |
Constructor. | |
Size ( var other) | |
Constructor. | |
Size ( local other) | |
Constructor. | |
Size (const Vec2 &point) | |
Constructor. More... | |
Size ( var point) | |
Constructor. More... | |
Size ( local point) | |
Constructor. More... | |
Size & | operator= (const Size &other) |
assign another value to this. | |
Size & | operator= (const Vec2 &point) |
assign another Vec2 value to this. More... | |
Size | operator+ (const Size &right) const |
add another Size to this. | |
Size | operator- (const Size &right) const |
substract another Size to this. | |
Size | operator* (float a) const |
scale the size by a. | |
Size | operator/ (float a) const |
shrink the size by a. | |
void | setSize (float width, float height) |
Set the width and height of Size. | |
bool | equals (const Size &target) const |
Check if two size is the same. | |
Public Attributes | |
float | width |
Width of the Size. | |
local | width |
Width of the Size. | |
float | height |
Height of the Size. | |
var | height |
Height of the Size. | |
local | height |
Height of the Size. | |
Static Public Attributes | |
static const Size | ZERO |
Size(0,0). | |
local | ZERO |
Size(0,0). | |
A size, which has width and height, could be used to represent the size in 2D.
Size | ( | float | width, |
float | height | ||
) |
Constructor.
Width of the size. Height of the size.
var Size | ( | var | width, |
var | height | ||
) |
Constructor.
Width of the size. Height of the size.
local Size | ( | local | width, |
local | height | ||
) |
Constructor.
Width of the size. Height of the size.
|
explicit |
Constructor.
a point.
|
explicit |
Constructor.
a point.