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

Method lightSources

source/game/items/StarInspectionTool.cpp:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60List<LightSource> InspectionTool::lightSources() const {
61 if (!initialized())
62 return {};
63
64 float angle = world()->geometry().diff(owner()->aimPosition(), owner()->position()).angle();
65 LightSource lightSource;
66 lightSource.type = LightType::Point;
67 lightSource.position = owner()->position() + owner()->handPosition(hand(), m_lightPosition - m_handPosition);
68 lightSource.color = m_lightColor.toRgbF();
69 lightSource.pointBeam = m_beamWidth;
70 lightSource.beamAngle = angle;
71 lightSource.beamAmbience = m_ambientFactor;
72 return {std::move(lightSource)};
73}
74
75float InspectionTool::inspectionHighlightLevel(InspectableEntityPtr const& inspectable) const {
76 if (m_showHighlights)

Callers

nothing calls this directly

Calls 7

toRgbFMethod · 0.80
angleMethod · 0.45
diffMethod · 0.45
geometryMethod · 0.45
aimPositionMethod · 0.45
positionMethod · 0.45
handPositionMethod · 0.45

Tested by

no test coverage detected