| 67 | } |
| 68 | |
| 69 | void PointLight::commit() |
| 70 | { |
| 71 | Light::commit(); |
| 72 | position = getParam<vec3f>("position", vec3f(0.f)); |
| 73 | radius = getParam<float>("radius", 0.f); |
| 74 | |
| 75 | // per default perpendicular to direction |
| 76 | direction = getParam<vec3f>("direction", vec3f(0.f, 0.f, 1.f)); |
| 77 | intensityDistribution.c0 = std::abs(direction.x) < std::abs(direction.y) |
| 78 | ? vec3f(0.0f, direction.z, direction.y) |
| 79 | : vec3f(direction.z, 0.0f, direction.x); |
| 80 | intensityDistribution.readParams(*this); |
| 81 | |
| 82 | queryIntensityQuantityType(intensityDistribution |
| 83 | ? OSP_INTENSITY_QUANTITY_SCALE |
| 84 | : OSP_INTENSITY_QUANTITY_INTENSITY); |
| 85 | processIntensityQuantityType(); |
| 86 | } |
| 87 | |
| 88 | void PointLight::processIntensityQuantityType() |
| 89 | { |
nothing calls this directly
no test coverage detected