Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ChunkLightData Class Reference

#include <ChunkData.h>

Collaboration diagram for ChunkLightData:
Collaboration graph
[legend]

Public Types

using LightArray = decltype(m_BlockLights)::Type
 
using SectionType = NIBBLETYPE[SectionLightCount]
 

Public Member Functions

void Assign (const ChunkLightData &a_Other)
 
NIBBLETYPE GetBlockLight (Vector3i a_Position) const
 
LightArrayGetBlockLightSection (size_t a_Y) const
 
NIBBLETYPE GetSkyLight (Vector3i a_Position) const
 
LightArrayGetSkyLightSection (size_t a_Y) const
 
void SetAll (const cChunkDef::BlockNibbles &a_BlockLightSource, const cChunkDef::BlockNibbles &a_SkyLightSource)
 
void SetSection (const SectionType &a_BlockLightSource, const SectionType &a_SkyLightSource, size_t a_Y)
 

Static Public Attributes

static constexpr NIBBLETYPE DefaultBlockLightValue = 0x00
 
static constexpr NIBBLETYPE DefaultSkyLightValue = 0xFF
 
static constexpr size_t SectionLightCount = (cChunkDef::SectionHeight * cChunkDef::Width * cChunkDef::Width) / 2
 

Private Attributes

ChunkDataStore< NIBBLETYPE, SectionLightCount, DefaultBlockLightValuem_BlockLights
 
ChunkDataStore< NIBBLETYPE, SectionLightCount, DefaultSkyLightValuem_SkyLights
 

Detailed Description

Definition at line 97 of file ChunkData.h.

Member Typedef Documentation

◆ LightArray

using ChunkLightData::LightArray = decltype(m_BlockLights)::Type

Definition at line 115 of file ChunkData.h.

◆ SectionType

Definition at line 106 of file ChunkData.h.

Member Function Documentation

◆ Assign()

void ChunkLightData::Assign ( const ChunkLightData a_Other)

Definition at line 202 of file ChunkData.cpp.

◆ GetBlockLight()

NIBBLETYPE ChunkLightData::GetBlockLight ( Vector3i  a_Position) const
inline

Definition at line 119 of file ChunkData.h.

◆ GetBlockLightSection()

LightArray* ChunkLightData::GetBlockLightSection ( size_t  a_Y) const
inline

Definition at line 122 of file ChunkData.h.

◆ GetSkyLight()

NIBBLETYPE ChunkLightData::GetSkyLight ( Vector3i  a_Position) const
inline

Definition at line 120 of file ChunkData.h.

◆ GetSkyLightSection()

LightArray* ChunkLightData::GetSkyLightSection ( size_t  a_Y) const
inline

Definition at line 123 of file ChunkData.h.

◆ SetAll()

void ChunkLightData::SetAll ( const cChunkDef::BlockNibbles a_BlockLightSource,
const cChunkDef::BlockNibbles a_SkyLightSource 
)

Definition at line 212 of file ChunkData.cpp.

◆ SetSection()

void ChunkLightData::SetSection ( const SectionType a_BlockLightSource,
const SectionType a_SkyLightSource,
size_t  a_Y 
)

Definition at line 222 of file ChunkData.cpp.

Member Data Documentation

◆ DefaultBlockLightValue

constexpr NIBBLETYPE ChunkLightData::DefaultBlockLightValue = 0x00
staticconstexpr

Definition at line 103 of file ChunkData.h.

◆ DefaultSkyLightValue

constexpr NIBBLETYPE ChunkLightData::DefaultSkyLightValue = 0xFF
staticconstexpr

Definition at line 104 of file ChunkData.h.

◆ m_BlockLights

ChunkDataStore<NIBBLETYPE, SectionLightCount, DefaultBlockLightValue> ChunkLightData::m_BlockLights
private

Definition at line 110 of file ChunkData.h.

◆ m_SkyLights

ChunkDataStore<NIBBLETYPE, SectionLightCount, DefaultSkyLightValue> ChunkLightData::m_SkyLights
private

Definition at line 111 of file ChunkData.h.

◆ SectionLightCount

constexpr size_t ChunkLightData::SectionLightCount = (cChunkDef::SectionHeight * cChunkDef::Width * cChunkDef::Width) / 2
staticconstexpr

Definition at line 101 of file ChunkData.h.


The documentation for this class was generated from the following files: