A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
IntRect Struct Reference

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
 

Detailed Description

Integer Rectangle.

Works almost like UnityEngine.Rect but with integer coordinates

Member Function Documentation

IntRect Expand ( int  range)

Returns a new rect which is expanded by range in all directions.

Parameters
rangeHow far to expand. Negative values are permitted.

+ Here is the caller graph for this function:

static IntRect Intersection ( IntRect  a,
IntRect  b 
)
static

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.

See Also
IsValid

+ Here is the caller graph for this function:

bool IsValid ( )

Returns if this rectangle is valid.

An invalid rect could have e.g xmin > xmax

static IntRect Union ( IntRect  a,
IntRect  b 
)
static

Returns a new rect which contains both input rects.

This rectangle may contain areas outside both input rect as well in some cases.

+ Here is the caller graph for this function:


The documentation for this struct was generated from the following file: