Light distance information.
More...
#include <kanzi/core.ui/graphics3d/gather_nearest_lights_render_pass.hpp>
Light distance information.
References a LightInfo structure from GatherLightsRenderPass. Adds distance so sorting is possible.
kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::LightDistanceInfo |
( |
LightInfo & |
lightInfo | ) |
|
|
explicit |
Constructor.
Calculates distance internally.
- Parameters
-
lightInfo | Gathered light info. |
LightInfo* kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::getLightInfo |
( |
| ) |
|
|
inline |
Gets the referred light.
- Returns
- Pointer to a light info struct.
void kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::updateDistance |
( |
const Node3D & |
referenceNode | ) |
|
Updates the distance based on a reference node.
- Parameters
-
referenceNode | Node with which to update the distance. |
bool kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::operator< |
( |
const LightDistanceInfo & |
other | ) |
const |
|
inline |
Less than operator for sorting.
- Parameters
-
other | Other distance info compared against. |
- Returns
- True if this is smaller than the counterpart.
LightInfo* kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::m_lightInfo |
|
protected |
Light information referred.
float kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::m_distanceSquared |
|
protected |
Distance to light (from reference node).
Saved as squared, there is no need to take the root simply for comparison.
The documentation for this class was generated from the following file: