SmallChunk

8x8x8 chunk

struct SmallChunk {}

Members

Functions

canPass
ulong canPass(ulong mask, Dir dir, Dir to, ubyte dirMask)
Undocumented in source. Be warned that the author may not have intended to support it.
compact
void compact()

destroys mesh

fillCanPassFrom
void fillCanPassFrom(Dir dirFrom)
Undocumented in source. Be warned that the author may not have intended to support it.
getCanPassFromFlags
ubyte getCanPassFromFlags(Dir dirFrom)

returns DirMask of available pass direction for specified FROM direction

getCell
cell_t getCell(int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
getCellNoCheck
cell_t getCellNoCheck(int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
getMesh
Mesh getMesh(World world)

get mesh for chunk (generate if not exists)

getSideCanPassFromMask
ulong getSideCanPassFromMask(Dir dir)

to this chunk for nearby chunk

getSideCanPassToMask
ulong getSideCanPassToMask(Dir dir)

get can pass mask for direction

release
void release()
Undocumented in source. Be warned that the author may not have intended to support it.
release
void release()
Undocumented in source. Be warned that the author may not have intended to support it.
setCell
void setCell(int x, int y, int z, cell_t value)
Undocumented in source. Be warned that the author may not have intended to support it.
visitVisibleFaces
void visitVisibleFaces(World world, CellVisitor visitor)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

hasVisibleFaces
bool hasVisibleFaces [@property getter]

returns true if chunk contains any visible faces

position
const(Vector3d) position [@property getter]

return chunk position in world (aligned to chunk origin)

Static functions

alloc
SmallChunk* alloc(int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
alloc
SmallChunk* alloc(int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
calcIndex
int calcIndex(int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
slicePlane0
ulong slicePlane0(ulong[8] planes)
Undocumented in source. Be warned that the author may not have intended to support it.
slicePlane7
ulong slicePlane7(ulong[8] planes)
Undocumented in source. Be warned that the author may not have intended to support it.
spreadFlags
void spreadFlags(ulong src, ulong[8] planes, ulong[8] dst, int start, int end, ubyte spreadMask)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_pos
Vector3d _pos;
Undocumented in source.
canPassFromTo
ubyte[6] canPassFromTo;
Undocumented in source.
canPassPlanesX
ulong[8] canPassPlanesX;
Undocumented in source.
canPassPlanesY
ulong[8] canPassPlanesY;
Undocumented in source.
canPassPlanesZ
ulong[8] canPassPlanesZ;
Undocumented in source.
cells
cell_t[8 * 8 * 8] cells;
Undocumented in source.
dirty
bool dirty;
Undocumented in source.
dirtyMesh
bool dirtyMesh;
Undocumented in source.
dirtyVisible
bool dirtyVisible;
Undocumented in source.
empty
bool empty;
Undocumented in source.
nearChunks
SmallChunk*[6] nearChunks;
Undocumented in source.
opaquePlanesX
ulong[8] opaquePlanesX;
Undocumented in source.
opaquePlanesY
ulong[8] opaquePlanesY;
Undocumented in source.
opaquePlanesZ
ulong[8] opaquePlanesZ;
Undocumented in source.
sunlight
ubyte[8 * 8 * 8] sunlight;
Undocumented in source.
visible
bool visible;
Undocumented in source.
visiblePlanesX
ulong[8] visiblePlanesX;
Undocumented in source.
visiblePlanesY
ulong[8] visiblePlanesY;
Undocumented in source.
visiblePlanesZ
ulong[8] visiblePlanesZ;
Undocumented in source.

Meta