reckfellENGINE

VoxelFormat

Specifies the format of voxels.

On this page
class VoxelFormatReckfellSharpInherits Resource

Specifies the format of voxels.

Specifies the format of voxels. Currently, it only stores how many bytes each channel uses per voxel. Voxels have a default format which is often enough for most use cases, but sometimes it is necessary to change it. In this case, you may create a new VoxelFormat resource, do the changes, and assign it to a VoxelEntity. WARNING: it is recommended to choose a format early in development (whether it is the default, or a custom one). If you want to change much later and you have saves in the wild, you will have to figure out how to convert them, otherwise loading them will be problematic.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

VoxelFormatConstructor
# VoxelFormat
C#
public VoxelFormat();

Properties5

ColorDepthProperty
# ColorDepth
C#
public VoxelBuffer.Depth ColorDepth { get; set; }

Depth of VoxelBuffer.ChannelId.ChannelColor.

IndicesDepthProperty
# IndicesDepth
C#
public VoxelBuffer.Depth IndicesDepth { get; set; }

Depth of VoxelBuffer.ChannelId.ChannelIndices. Only 8-bit and 16-bit depths are supported.

SdfDepthProperty
# SdfDepth
C#
public VoxelBuffer.Depth SdfDepth { get; set; }

Depth of VoxelBuffer.ChannelId.ChannelSdf.

TypeDepthProperty
# TypeDepth
C#
public VoxelBuffer.Depth TypeDepth { get; set; }

Depth of VoxelBuffer.ChannelId.ChannelType. Only 8-bit and 16-bit depths are supported.

_DataProperty
# _Data
C#
public Reckfell.Collections.Array _Data { get; set; }

Methods4

ConfigureBuffervoid
# ConfigureBuffer
C#
public void ConfigureBuffer(VoxelBuffer buffer);

Clears and formats the VoxelBuffer using properties from the current format. Should be used on a buffer that hasn't been modified yet.

Parameters
NameTypeDefault
bufferVoxelBuffer—
CreateBufferVoxelBuffer
# CreateBuffer
C#
public VoxelBuffer CreateBuffer(Vector3I size);

Creates a new VoxelBuffer that has the current format.

Parameters
NameTypeDefault
sizeVector3I—
Returns VoxelBuffer
GetChannelDepthVoxelBuffer.Depth
# GetChannelDepth
C#
public VoxelBuffer.Depth GetChannelDepth(VoxelBuffer.ChannelId channelIndex);

Gets the depth of a specific channel. See VoxelBuffer.Depth for more information.

Parameters
NameTypeDefault
channelIndexVoxelBuffer.ChannelId—
Returns VoxelBuffer.Depth
SetChannelDepthvoid
# SetChannelDepth
C#
public void SetChannelDepth(VoxelBuffer.ChannelId channelIndex, VoxelBuffer.Depth depth);

Sets the depth of a specific channel. See VoxelBuffer.Depth for more information.

Parameters
NameTypeDefault
channelIndexVoxelBuffer.ChannelId—
depthVoxelBuffer.Depth—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.