Static access to AreaOfInterest for backwards compatibility.
More...
|
| static int | GetCellSize () |
| | Get the size of each cell in the AOI grid.
|
| static void | SphereToCells (Vector3 position, float radius, HashSet< int > cells) |
| | Convert a sphere into a set of AOI cells.
|
| static int | ToCell (int x, int y, int z) |
| | Convert a cell coordinate into the respective cell index.
|
| static int | ToCell (Vector3 position) |
| | Convert a position into the respective cell index.
|
| static Vector3 | ToCellCenter (int index) |
| | Convert a cell index into the respective cell center position.
|
|
| static int | x |
| | Get the size of the AOI grid.
|
|
|
static int | CELL_SIZE [get] |
| | Size of each cell in the AOI grid.
|
Static access to AreaOfInterest for backwards compatibility.
◆ GetCellSize()
Get the size of each cell in the AOI grid.
- Returns
- The size of each cell in the AOI grid.
◆ SphereToCells()
| void SphereToCells |
( |
Vector3 | position, |
|
|
float | radius, |
|
|
HashSet< int > | cells ) |
|
static |
Convert a sphere into a set of AOI cells.
- Parameters
-
| position | Sphere center |
| radius | Sphere radius. Max allowed radius is AreaOfInterestState.MaxSharedRadius |
| cells | Resulting set of cells |
◆ ToCell() [1/2]
| int ToCell |
( |
int | x, |
|
|
int | y, |
|
|
int | z ) |
|
static |
Convert a cell coordinate into the respective cell index.
- Parameters
-
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
- Returns
- Cell index
◆ ToCell() [2/2]
| int ToCell |
( |
Vector3 | position | ) |
|
|
static |
Convert a position into the respective cell index.
- Parameters
-
- Returns
- Cell index
◆ ToCellCenter()
| Vector3 ToCellCenter |
( |
int | index | ) |
|
|
static |
Convert a cell index into the respective cell center position.
- Parameters
-
- Returns
- Cell center position
Get the size of the AOI grid.
Clamp cell coordinates to the valid range.
Converts a cell index into its corresponding cell coordinates.
Convert a position into the respective cell coordinate.
- Returns
- The size of the AOI grid.
- Parameters
-
- Returns
- Cell coordinate
- Parameters
-
| index | The index of the cell to be converted. |
- Returns
- A tuple containing the x, y, and z coordinates of the cell.
- Parameters
-
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
- Returns
- Clamped cell coordinates