Definition at line 9 of file Rect.cs.
◆ Rect() [1/3]
FalcoEngine.Rect.Rect |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
width, |
|
|
float |
height |
|
) |
| |
Creates a new rectangle.
- Parameters
-
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. |
Definition at line 232 of file Rect.cs.
◆ Rect() [2/3]
Creates a rectangle given a size and position.
- Parameters
-
position | The position of the minimum corner of the rect. |
size | The width and height of the rect. |
Definition at line 245 of file Rect.cs.
◆ Rect() [3/3]
FalcoEngine.Rect.Rect |
( |
Rect |
source | ) |
|
- Parameters
-
Definition at line 257 of file Rect.cs.
◆ Contains() [1/3]
bool FalcoEngine.Rect.Contains |
( |
Vector2 |
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 allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
- Parameters
-
point | Point to test. |
allowInverse | Does the test allow the Rect's width and height to be negative? |
- Returns
- True if the point lies within the specified rectangle.
Definition at line 303 of file Rect.cs.
◆ Contains() [2/3]
bool FalcoEngine.Rect.Contains |
( |
Vector3 |
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 allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
- Parameters
-
point | Point to test. |
allowInverse | Does the test allow the Rect's width and height to be negative? |
- Returns
- True if the point lies within the specified rectangle.
Definition at line 316 of file Rect.cs.
◆ Contains() [3/3]
bool FalcoEngine.Rect.Contains |
( |
Vector3 |
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 allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
- Parameters
-
point | Point to test. |
allowInverse | Does the test allow the Rect's width and height to be negative? |
- Returns
- True if the point lies within the specified rectangle.
Definition at line 329 of file Rect.cs.
◆ Equals() [1/2]
override bool FalcoEngine.Rect.Equals |
( |
object |
other | ) |
|
◆ Equals() [2/2]
bool FalcoEngine.Rect.Equals |
( |
Rect |
other | ) |
|
◆ GetHashCode()
override int FalcoEngine.Rect.GetHashCode |
( |
| ) |
|
◆ MinMaxRect()
static Rect FalcoEngine.Rect.MinMaxRect |
( |
float |
xmin, |
|
|
float |
ymin, |
|
|
float |
xmax, |
|
|
float |
ymax |
|
) |
| |
|
static |
Creates a rectangle from min/max coordinate values.
- Parameters
-
xmin | The minimum X coordinate. |
ymin | The minimum Y coordinate. |
xmax | The maximum X coordinate. |
ymax | The maximum Y coordinate. |
- Returns
- A rectangle matching the specified coordinates.
Definition at line 275 of file Rect.cs.
◆ NormalizedToPoint()
static Vector2 FalcoEngine.Rect.NormalizedToPoint |
( |
Rect |
rectangle, |
|
|
Vector2 |
normalizedRectCoordinates |
|
) |
| |
|
static |
Returns a point inside a rectangle, given normalized coordinates.
- Parameters
-
rectangle | Rectangle to get a point inside. |
normalizedRectCoordinates | Normalized coordinates to get a point for. |
Definition at line 395 of file Rect.cs.
◆ operator!=()
static bool FalcoEngine.Rect.operator!= |
( |
Rect |
lhs, |
|
|
Rect |
rhs |
|
) |
| |
|
static |
◆ operator==()
static bool FalcoEngine.Rect.operator== |
( |
Rect |
lhs, |
|
|
Rect |
rhs |
|
) |
| |
|
static |
◆ Overlaps() [1/2]
bool FalcoEngine.Rect.Overlaps |
( |
Rect |
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.
- Parameters
-
other | Other rectangle to test overlapping with. |
allowInverse | Does the test allow the widths and heights of the Rects to be negative? |
Definition at line 369 of file Rect.cs.
◆ Overlaps() [2/2]
bool FalcoEngine.Rect.Overlaps |
( |
Rect |
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.
- Parameters
-
other | Other rectangle to test overlapping with. |
allowInverse | Does the test allow the widths and heights of the Rects to be negative? |
Definition at line 379 of file Rect.cs.
◆ PointToNormalized()
Returns the normalized coordinates cooresponding the the point.
- Parameters
-
rectangle | Rectangle to get normalized coordinates inside. |
point | A point inside the rectangle to get normalized coordinates for. |
Definition at line 405 of file Rect.cs.
◆ Set()
void FalcoEngine.Rect.Set |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
width, |
|
|
float |
height |
|
) |
| |
Set components of an existing Rect.
- Parameters
-
Definition at line 287 of file Rect.cs.
◆ ToString() [1/2]
override string FalcoEngine.Rect.ToString |
( |
| ) |
|
Returns a nicely formatted string for this Rect.
- Parameters
-
Definition at line 443 of file Rect.cs.
◆ ToString() [2/2]
string FalcoEngine.Rect.ToString |
( |
string |
format | ) |
|
Returns a nicely formatted string for this Rect.
- Parameters
-
Definition at line 452 of file Rect.cs.
◆ center
The position of the center of the rectangle.
Definition at line 70 of file Rect.cs.
◆ height
float FalcoEngine.Rect.height |
|
getset |
The height of the rectangle, measured from the Y position.
Definition at line 133 of file Rect.cs.
◆ max
The position of the maximum corner of the rectangle.
Definition at line 102 of file Rect.cs.
◆ min
The position of the minimum corner of the rectangle.
Definition at line 86 of file Rect.cs.
◆ position
The X and Y position of the rectangle.
Definition at line 54 of file Rect.cs.
◆ size
The width and height of the rectangle.
Definition at line 148 of file Rect.cs.
◆ width
float FalcoEngine.Rect.width |
|
getset |
The width of the rectangle, measured from the X position.
Definition at line 118 of file Rect.cs.
The X coordinate of the rectangle.
Definition at line 24 of file Rect.cs.
◆ xMax
float FalcoEngine.Rect.xMax |
|
getset |
The maximum X coordinate of the rectangle.
Definition at line 198 of file Rect.cs.
◆ xMin
float FalcoEngine.Rect.xMin |
|
getset |
The minimum X coordinate of the rectangle.
Definition at line 164 of file Rect.cs.
The Y coordinate of the rectangle.
Definition at line 39 of file Rect.cs.
◆ yMax
float FalcoEngine.Rect.yMax |
|
getset |
The maximum Y coordinate of the rectangle.
Definition at line 213 of file Rect.cs.
◆ yMin
float FalcoEngine.Rect.yMin |
|
getset |
The minimum Y coordinate of the rectangle.
Definition at line 181 of file Rect.cs.
◆ zero
Rect FalcoEngine.Rect.zero |
|
staticget |
Shorthand for writing new Rect(0,0,0,0).
Definition at line 19 of file Rect.cs.
The documentation for this struct was generated from the following file: