public bool CanCreateFace(VoxelType neighbor) { if (neighbor == null) { return(true); } else { switch (FaceMode) { case VoxelFaceMode.Transparent: return(neighbor.FaceMode != VoxelFaceMode.Opaque && neighbor != this); case VoxelFaceMode.Opaque: case VoxelFaceMode.TransparentInner: return(neighbor.FaceMode != VoxelFaceMode.Opaque); default: return(false); } } }
public VoxelData(VoxelType type, VoxelTypeIndex index) : this(new Voxel(type, 0), index) { }
public Voxel(VoxelType type, ushort data = 0) { Type = type; Data = data; }
public VoxelData(VoxelType type, ushort data, VoxelTypeIndex index) : this(new Voxel(type, data), index) { }
public Voxel(VoxelData data, VoxelTypeIndex index) { Type = index[data.TypeIndex]; Data = data.Data; }