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

Method addPointLight

source/base/StarCellularLighting.cpp:114–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void CellularLightingCalculator::addPointLight(Vec2F const& position, Vec3F const& light, float beam, float beamAngle, float beamAmbience, bool asSpread) {
115 Vec2F arrayPosition = position - Vec2F(m_calculationRegion.min());
116 if (m_monochrome)
117 m_lightArray.right().addPointLight({arrayPosition, light.max(), beam, beamAngle, beamAmbience, asSpread});
118 else
119 m_lightArray.left().addPointLight({arrayPosition, light, beam, beamAngle, beamAmbience, asSpread});
120}
121
122void CellularLightingCalculator::calculate(Image& output) {
123 Vec2S arrayMin = Vec2S(m_queryRegion.min() - m_calculationRegion.min());

Callers 2

lightingCalcMethod · 0.45
lightLevelFunction · 0.45

Calls 4

rightMethod · 0.80
leftMethod · 0.80
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected