Sinespace Client
2023.2.17543
Client-side scripting for Sinespace
|
Implements a 2D Rectangle class More...
Public Member Functions | |
bool | Contains (SVector point) |
Returns true if the x and y components of point is a point inside this rectangle.If allowInverse is present and true , the width and height of the Rect are allowedto take negative values (ie, the min value is greater than the max), and thetest will still work. More... | |
bool | Contains (SVector point, bool allowInverse) |
Returns true if the x and y components of point is a point inside this rectangle.If allowInverse is present and true , the width and height of the Rect are allowedto take negative values (ie, the min value is greater than the max), and thetest will still work. More... | |
bool | Overlaps (SRect other) |
Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work. More... | |
bool | Overlaps (SRect other, bool allowInverse) |
Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work. More... | |
bool | Equals (Rect other) |
string | ToString (string format) |
Returns a nicely formatted string for this Rect. More... | |
SRect (float x, float y, float width, float height) | |
bool | Equals (SRect other) |
Returns true if the rect is same as other. More... | |
override string | ToString () |
Returns string for this Rect. More... | |
Static Public Member Functions | |
static SRect | New (float x, float y, float width, float height) |
Constructs a new SRect (for easier Lua Access) More... | |
Public Attributes | |
float | X |
Axis parameters More... | |
float | Y |
float | Width |
float | Height |
Properties | |
SVector | Position [get] |
The X and Y position of the rectangle. More... | |
SVector | Center [get] |
The position of the center of the rectangle. More... | |
SVector | Min [get] |
The position of the minimum corner of the rectangle. More... | |
SVector | Max [get] |
The position of the maximum corner of the rectangle. More... | |
SVector | Size [get] |
The width and height of the rectangle. More... | |
float | XMin [get] |
The minimum X coordinate of the rectangle. More... | |
float | YMin [get] |
The minimum Y coordinate of the rectangle. More... | |
float | XMax [get] |
The maximum X coordinate of the rectangle. More... | |
float | YMax [get] |
The maximum Y coordinate of the rectangle. More... | |
float | Left [get] |
float | Right [get] |
float | Top [get] |
float | Bottom [get] |
Implements a 2D Rectangle class
SineSpace.Scripting.Types.SRect.SRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
bool SineSpace.Scripting.Types.SRect.Contains | ( | SVector | point | ) |
Returns true if the x and y components of point is a point inside this rectangle.If allowInverse is present and true , the width and height of the Rect are allowedto take negative values (ie, the min value is greater than the max), and thetest will still work.
point | Point to test. |
bool SineSpace.Scripting.Types.SRect.Contains | ( | SVector | point, |
bool | allowInverse | ||
) |
Returns true if the x and y components of point is a point inside this rectangle.If allowInverse is present and true , the width and height of the Rect are allowedto take negative values (ie, the min value is greater than the max), and thetest will still work.
point | Point to test. |
allowInverse | Does the test allow the Rect's width and height to be negative? |
bool SineSpace.Scripting.Types.SRect.Equals | ( | Rect | other | ) |
bool SineSpace.Scripting.Types.SRect.Equals | ( | SRect | other | ) |
Returns true if the rect is same as other.
other | Other rect. |
|
static |
Constructs a new SRect (for easier Lua Access)
x | The X value the rect is measured from. |
y | The Y value the rect is measured from. |
width | The width of the rectangle. |
height | The height of the rectangle. |
bool SineSpace.Scripting.Types.SRect.Overlaps | ( | SRect | other | ) |
Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
other | Other rectangle to test overlapping with. |
bool SineSpace.Scripting.Types.SRect.Overlaps | ( | SRect | other, |
bool | allowInverse | ||
) |
Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
other | Other rectangle to test overlapping with. |
allowInverse | Does the test allow the Rect's width and height to be negative? |
override string SineSpace.Scripting.Types.SRect.ToString | ( | ) |
Returns string for this Rect.
format | Other rectangle to test overlapping with. |
string SineSpace.Scripting.Types.SRect.ToString | ( | string | format | ) |
Returns a nicely formatted string for this Rect.
format | Other rectangle to test overlapping with. |
float SineSpace.Scripting.Types.SRect.Height |
float SineSpace.Scripting.Types.SRect.Width |
float SineSpace.Scripting.Types.SRect.X |
Axis parameters
float SineSpace.Scripting.Types.SRect.Y |
|
get |
|
get |
The position of the center of the rectangle.
|
get |
|
get |
The position of the maximum corner of the rectangle.
|
get |
The position of the minimum corner of the rectangle.
|
get |
The X and Y position of the rectangle.
|
get |
|
get |
The width and height of the rectangle.
|
get |
|
get |
The maximum X coordinate of the rectangle.
|
get |
The minimum X coordinate of the rectangle.
|
get |
The maximum Y coordinate of the rectangle.
|
get |
The minimum Y coordinate of the rectangle.