Show / Hide Table of Contents

Class GridUtilsGrid3D

Utility functions for conversions between cell and local positions.

Inheritance
System.Object
GridUtilsGrid3D
Namespace: Edgar.Unity
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
Type Description
Vector3

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
Type Description
Vector3

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
In This Article
Back to top Generated by DocFX