VoxelBlockyLibrary
Contains a list of models that can be used by VoxelMesherBlocky.
Contains a list of models that can be used by VoxelMesherBlocky.
Provides a list of models that can be used by VoxelMesherBlocky. Each model corresponds to an ID in voxel data, and is generally defined from a mesh. Some extra properties can also be defined, such as how sides get culled by neighbor voxels, or how it is treated by some functionality of the voxel engine.
If you create this library from code, it needs to be baked at the end using the VoxelBlockyLibraryBase.Bake function.
The first model (at index 0) is conventionally used for "air" or "empty".
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
VoxelBlockyLibraryConstructor
public VoxelBlockyLibrary();Properties1
ModelsProperty
public Reckfell.Collections.Array<VoxelBlockyModel> Models { get; set; }Array of all the models. The index of each model corresponds to the value representing them in voxel data's TYPE channel.
Methods5
AddModelint
public int AddModel(VoxelBlockyModel model);Adds a model to the library. Returns its index, which will be the value of voxels representing it.
| Name | Type | Default |
|---|---|---|
model | VoxelBlockyModel | — |
intGetModelVoxelBlockyModel
public VoxelBlockyModel GetModel(uint index);Gets a model from its index.
| Name | Type | Default |
|---|---|---|
index | uint | — |
VoxelBlockyModelGetModelIndexFromResourceNameint
public int GetModelIndexFromResourceName(string name);Finds the index of the first model having the specified resource name. If not found, returns null.
| Name | Type | Default |
|---|---|---|
name | string | — |
intGetModelsReckfell.Collections.Array<VoxelBlockyModel>
public Reckfell.Collections.Array<VoxelBlockyModel> GetModels();Reckfell.Collections.Array<VoxelBlockyModel>SetModelsvoid
public void SetModels(Reckfell.Collections.Array<VoxelBlockyModel> _UnnamedArg0);| Name | Type | Default |
|---|---|---|
_UnnamedArg0 | Reckfell.Collections.Array<VoxelBlockyModel> | — |