MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setCellColumn

Method setCellColumn

source/base/StarCellularLighting.cpp:216–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void CellularLightIntensityCalculator::setCellColumn(Vec2I const& position, Cell const* cells, size_t count) {
217 size_t baseIndex = (position[0] - m_calculationRegion.xMin()) * m_calculationRegion.height() + position[1] - m_calculationRegion.yMin();
218 for (size_t i = 0; i < count; ++i)
219 m_lightArray.cellAtIndex(baseIndex + i) = cells[i];
220}
221
222void CellularLightIntensityCalculator::addSpreadLight(Vec2F const& position, float light) {
223 Vec2F arrayPosition = position - Vec2F(m_calculationRegion.min());

Callers 1

lightLevelFunction · 0.80

Calls 4

xMinMethod · 0.80
yMinMethod · 0.80
cellAtIndexMethod · 0.80
heightMethod · 0.45

Tested by

no test coverage detected