A* Pathfinding Project
3.1.4
The A* Pathfinding Project for Unity 3D
|
Integer Rectangle. More...
Public Member Functions | |
IntRect (int xmin, int ymin, int xmax, int ymax) | |
bool | Contains (int x, int y) |
void | DebugDraw (Matrix4x4 matrix, Color col) |
IntRect | Expand (int range) |
Returns a new rect which is expanded by range in all directions. | |
bool | IsValid () |
Returns if this rectangle is valid. | |
Static Public Member Functions | |
static IntRect | Intersection (IntRect a, IntRect b) |
Returns the intersection rect between the two rects. | |
static IntRect | Union (IntRect a, IntRect b) |
Returns a new rect which contains both input rects. | |
Public Attributes | |
int | xmax |
int | xmin |
int | ymax |
int | ymin |
Integer Rectangle.
Works almost like UnityEngine.Rect but with integer coordinates
IntRect Expand | ( | int | range | ) |
Returns a new rect which is expanded by range in all directions.
range | How far to expand. Negative values are permitted. |
Returns the intersection rect between the two rects.
The intersection rect is the area which is inside both rects. If the rects do not have an intersection, an invalid rect is returned.
bool IsValid | ( | ) |
Returns if this rectangle is valid.
An invalid rect could have e.g xmin > xmax
Returns a new rect which contains both input rects.
This rectangle may contain areas outside both input rect as well in some cases.