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.
Declared in detail namespace to ensure equals operator lookup works.
◆ LightDistanceInfo() [1/2]
| kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::LightDistanceInfo |
( |
| ) |
|
|
explicitdefault |
◆ LightDistanceInfo() [2/2]
| kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::LightDistanceInfo |
( |
LightInfo & | lightInfo | ) |
|
|
explicit |
Constructor.
Calculates distance internally.
- Parameters
-
| lightInfo | Gathered light info. |
◆ getLightInfo()
| LightInfo * kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::getLightInfo |
( |
| ) |
const |
|
inline |
Gets the referred light.
- Returns
- Pointer to a light info struct.
◆ getDistanceSquared()
| float kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::getDistanceSquared |
( |
| ) |
const |
|
inline |
Gets the distance squared.
- Returns
- Distance squared.
◆ updateDistance()
| 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. |
◆ operator<()
Less than operator for sorting.
- Parameters
-
| other | Other distance info compared against. |
- Returns
- True if this is smaller than the counterpart.
◆ operator==()
Equals operator.
- Parameters
-
- Returns
- If the distance informations are equal true, false otherwise.
◆ operator!=()
Not equals operator.
- Parameters
-
- Returns
- If the distance informations are not equal true, false otherwise.
◆ m_lightInfo
| LightInfo* kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::m_lightInfo |
|
protected |
Light information referred.
◆ m_distanceSquared
| 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: