Class GridUtilsGrid3D
Utility functions for conversions between cell and local positions.
Inheritance
System.Object
GridUtilsGrid3D
Assembly: cs.temp.dll.dll
Syntax
public static class GridUtilsGrid3D
Methods
CellToLocal(Vector3, Vector3)
Declaration
public static Vector3 CellToLocal(Vector3 cellPosition, Vector3 cellSize)
Parameters
Type |
Name |
Description |
Vector3 |
cellPosition |
|
Vector3 |
cellSize |
|
Returns
IsSnappedToCell(Vector3, Vector3Int)
Declaration
public static bool IsSnappedToCell(Vector3 cellPositionInterpolated, Vector3Int cellPosition)
Parameters
Type |
Name |
Description |
Vector3 |
cellPositionInterpolated |
|
Vector3Int |
cellPosition |
|
Returns
Type |
Description |
System.Boolean |
|
LocalToCell(Vector3, Vector3)
Declaration
public static Vector3Int LocalToCell(Vector3 worldPosition, Vector3 cellSize)
Parameters
Type |
Name |
Description |
Vector3 |
worldPosition |
|
Vector3 |
cellSize |
|
Returns
Type |
Description |
Vector3Int |
|
LocalToCellInterpolated(Vector3, Vector3)
Declaration
public static Vector3 LocalToCellInterpolated(Vector3 localPosition, Vector3 cellSize)
Parameters
Type |
Name |
Description |
Vector3 |
localPosition |
|
Vector3 |
cellSize |
|
Returns
SnapInterpolatedToCell(Vector3)
Declaration
public static Vector3Int SnapInterpolatedToCell(Vector3 cellPositionInterpolated)
Parameters
Type |
Name |
Description |
Vector3 |
cellPositionInterpolated |
|
Returns
Type |
Description |
Vector3Int |
|
SnapInterpolatedToCellRound(Vector3)
Declaration
public static Vector3Int SnapInterpolatedToCellRound(Vector3 cellPositionInterpolated)
Parameters
Type |
Name |
Description |
Vector3 |
cellPositionInterpolated |
|
Returns
Type |
Description |
Vector3Int |
|