Class GridBuilderVisitor
This class can build SlotGrids from any IVoxelGrid.
This follows the double-dispatch pattern and decouples SlotGrid construction from the classes implementing IVoxelGrid. The IVoxelGrid implementors can focus on implementing IVoxelGrid.
Inheritance
System.Object
GridBuilderVisitor
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CarbideFunction.Wildtile
Syntax
public class GridBuilderVisitor : IVoxelGridVisitor
Constructors
GridBuilderVisitor(Tileset)
Declaration
public GridBuilderVisitor(Tileset tileset)
Parameters
Type | Name | Description |
---|---|---|
Tileset | tileset |
Fields
slotGrid
Will be populated by visiting a voxel grid.
Declaration
public SlotGrid slotGrid
Field Value
Type | Description |
---|---|
SlotGrid |
Properties
RootPosition
Declaration
public Vector3 RootPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Explicit Interface Implementations
IVoxelGridVisitor.VisitIrregularVoxelGrid(IrregularVoxelGrid)
Declaration
void IVoxelGridVisitor.VisitIrregularVoxelGrid(IrregularVoxelGrid voxelGrid)
Parameters
Type | Name | Description |
---|---|---|
IrregularVoxelGrid | voxelGrid |
IVoxelGridVisitor.VisitRectangularVoxelGrid(VoxelGrid)
Declaration
void IVoxelGridVisitor.VisitRectangularVoxelGrid(VoxelGrid voxelGrid)
Parameters
Type | Name | Description |
---|---|---|
VoxelGrid | voxelGrid |