Table of Contents

Interface IVoxelPartition

Namespace
GridForge.Spatial
Assembly
GridForge.dll

Represents a partition within a Voxel that modifies its behavior. Partitions can define special attributes or metadata for a voxel, such as terrain type or navigation properties.

public interface IVoxelPartition

Properties

WorldIndex

The world-scoped identity of the parent voxel where this partition is attached.

WorldVoxelIndex WorldIndex { get; }

Property Value

WorldVoxelIndex

Methods

OnAddToVoxel(Voxel)

Called when adding this partition to a Voxel.

void OnAddToVoxel(Voxel voxel)

Parameters

voxel Voxel

OnRemoveFromVoxel(Voxel)

Called when this partition is removed from a Voxel. Cleans up any associated data.

void OnRemoveFromVoxel(Voxel voxel)

Parameters

voxel Voxel

SetParentIndex(WorldVoxelIndex)

Called when adding this partition to a Voxel

void SetParentIndex(WorldVoxelIndex parentVoxelIndex)

Parameters

parentVoxelIndex WorldVoxelIndex

The world-scoped identity of the parent Voxel.