Struct SerializableSparseVoxelSet
- Namespace
- GridForge.Configuration
Unity-serializable sparse voxel authoring data.
[Serializable]
public struct SerializableSparseVoxelSet
- Inherited Members
Constructors
SerializableSparseVoxelSet(IEnumerable<SerializableVoxelIndex>)
Creates a sparse voxel set from serializable indices.
public SerializableSparseVoxelSet(IEnumerable<SerializableVoxelIndex> indices)
Parameters
indicesIEnumerable<SerializableVoxelIndex>The indices to copy.
Properties
Count
Gets the number of configured indices.
public readonly int Count { get; }
Property Value
Empty
Gets an empty sparse voxel set.
public static SerializableSparseVoxelSet Empty { get; }
Property Value
HasConfiguredVoxels
Gets whether at least one voxel index is configured.
public readonly bool HasConfiguredVoxels { get; }
Property Value
Indices
Gets the runtime list of serializable indices.
public readonly SwiftList<SerializableVoxelIndex> Indices { get; }
Property Value
Methods
FromVoxelIndices(IEnumerable<VoxelIndex>)
Creates serializable sparse data from runtime indices.
public static SerializableSparseVoxelSet FromVoxelIndices(IEnumerable<VoxelIndex> indices)
Parameters
indicesIEnumerable<VoxelIndex>The runtime indices to copy.
Returns
- SerializableSparseVoxelSet
The serializable sparse voxel set.
TryToVoxelIndices(out VoxelIndex[], out string)
Validates and converts the configured values to runtime indices.
public readonly bool TryToVoxelIndices(out VoxelIndex[] indices, out string failureReason)
Parameters
indicesVoxelIndex[]Receives the runtime indices.
failureReasonstringReceives the validation failure reason.