Photon Fusion
2.1.1
Area of Interest Definition. More...
Public Member Functions | |
| AreaOfInterestState (InterestManagementConfig config) | |
| Create a new instance of the AreaOfInterestState struct. | |
| int | GetCellSize () |
| Get the size of each cell in the AOI grid. | |
| void | SphereToCells (Vector3 position, float radius, HashSet< int > cells) |
| Convert a sphere into a set of AOI cells. The conversion does not use a sphere but all cells that are inside cube centered at the position with edgeSize = radius * 2. | |
| int | ToCell (int x, int y, int z) |
| Convert a cell coordinate into the respective cell index. | |
| int | ToCell (Vector3 position) |
| Convert a position into the respective cell index. | |
| Vector3 | ToCellCenter (int index) |
| Convert a cell index into the respective cell center position. | |
Public Attributes | |
| int | x |
| Get the size of the AOI grid. | |
Area of Interest Definition.
| AreaOfInterestState | ( | InterestManagementConfig | config | ) |
Create a new instance of the AreaOfInterestState struct.
| config | The config to initialize. |
| int GetCellSize | ( | ) |
Get the size of each cell in the AOI grid.
| void SphereToCells | ( | Vector3 | position, |
| float | radius, | ||
| HashSet< int > | cells ) |
Convert a sphere into a set of AOI cells. The conversion does not use a sphere but all cells that are inside cube centered at the position with edgeSize = radius * 2.
| position | Sphere center |
| radius | Sphere radius. Max allowed radius is MaxSharedRadius |
| cells | Resulting set of cells |
| int ToCell | ( | int | x, |
| int | y, | ||
| int | z ) |
Convert a cell coordinate into the respective cell index.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| int ToCell | ( | Vector3 | position | ) |
Convert a position into the respective cell index.
| position | Position |
| Vector3 ToCellCenter | ( | int | index | ) |
Convert a cell index into the respective cell center position.
| index | Cell index |
| int x |
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.
| position | Position |
| index | The index of the cell to be converted. |
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |