Chunk

class Chunk
List<Vector3> _newVerts { }
List<Int32> _newTris { }
List<Vector2> _newUV { }
List<Color> _newColors { }
Int32 _faceCount { }
Mesh _mesh { }
MeshCollider _col { }
Boolean _updateMesh { }
Boolean _clearMesh { }
State _state { }
Int32 _chunkSize { }
ChunkPos _chunkPos { }
DataChunk _chunkData { }
public void LoadData (ChunkPos pos, DataChunk chunkData)

Loads data into chunk.

public void UpdateState ()

Lets chunk know it can properly update its state.

public void GenerateBlocks ()

Tells chunk to generate its blocks.

public void GenerateMesh ()

Tells chunk to generate its mesh.

Atlas.ID Block (BlockPos pos)

Get block from position

UpdateMesh ()

Updates mesh.

void CubeUp (Int32 x, Int32 y, Int32 z, Atlas.ID block)
void CubeDown (Int32 x, Int32 y, Int32 z, Atlas.ID block)
void CubeNorth (Int32 x, Int32 y, Int32 z, Atlas.ID block)
void CubeSouth (Int32 x, Int32 y, Int32 z, Atlas.ID block)
void CubeEast (Int32 x, Int32 y, Int32 z, Atlas.ID block)
void CubeWest (Int32 x, Int32 y, Int32 z, Atlas.ID block)
void Cube (Vector2 texturePos)
enum State
Fresh

The chunk has been freshly created, but it has no data associated.

Prepped

The chunk now has its basic data.

Generating

The chunk is actively generating or retrieving block data.

Loaded

The chunk has its block data loaded.

Rendered

The chunk is actively rendering.