region_check(STRING* name, VECTOR* vMin, VECTOR* vMax)

Checks if a given bounding box lies within a certain region.

Parameters:

name - region name, STRING* or char*.
vMin - bounding box minimum coordinate.
vMin - bounding box maximum coordinate.

Returns:

0 - box is fully outside the region.
1 - box is partially inside the region.
2 - box is fully inside the region.

Speed:

Medium.

Remarks:

Edition:

A8

Example:

VECTOR vMin,vMax;
vec_set(vMin,my.x);
vec_set(vMax,my.x);
vec_add(vMin,my.min_x);
vec_add(vMax,my.max_x);
if(region_check("trigger_01",vMin,vMax))
  printf("Entity in region!");

See also:

view_check, region_set, region_find, region_create, region_get

► latest version online