Class VoxelGrid
Inheritance
System.Object
VoxelGrid
Syntax
public class VoxelGrid : ScriptableObject
Fields
dimensionXName
Declaration
public const string dimensionXName = "dimensionX"
Field Value
Type |
Description |
System.String |
|
dimensionYName
Declaration
public const string dimensionYName = "dimensionY"
Field Value
Type |
Description |
System.String |
|
dimensionZName
Declaration
public const string dimensionZName = "dimensionZ"
Field Value
Type |
Description |
System.String |
|
voxelDataName
Declaration
public const string voxelDataName = "voxelData"
Field Value
Type |
Description |
System.String |
|
Properties
Dimensions
Declaration
public Vector3Int Dimensions { get; }
Property Value
Type |
Description |
Vector3Int |
|
Item[Int32, Int32, Int32]
Declaration
public int this[int x, int y, int z] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
System.Int32 |
z |
|
Property Value
Type |
Description |
System.Int32 |
|
Item[Vector3Int]
Declaration
public int this[Vector3Int coord] { get; set; }
Parameters
Type |
Name |
Description |
Vector3Int |
coord |
|
Property Value
Type |
Description |
System.Int32 |
|
Methods
GetCubeContents(Vector3Int)
Declaration
public int GetCubeContents(Vector3Int coords)
Parameters
Type |
Name |
Description |
Vector3Int |
coords |
|
Returns
Type |
Description |
System.Int32 |
|
IsWithinBounds(Vector3Int)
Declaration
public bool IsWithinBounds(Vector3Int coord)
Parameters
Type |
Name |
Description |
Vector3Int |
coord |
|
Returns
Type |
Description |
System.Boolean |
|
SetDimensionsAndClearGrid(Vector3Int)
Declaration
public void SetDimensionsAndClearGrid(Vector3Int newDimensions)
Parameters
Type |
Name |
Description |
Vector3Int |
newDimensions |
|