Kanzi  3.9.4
Kanzi Engine API
kanzi::GatherNearestLightsRenderPass::LightDistanceInfo Class Reference

Light distance information. More...

#include <kanzi/core.ui/graphics3d/gather_nearest_lights_render_pass.hpp>

Public Member Functions

LightInfo * getLightInfo ()
 Gets the referred light. More...
 
 LightDistanceInfo (LightInfo &lightInfo)
 Constructor. More...
 
bool operator< (const LightDistanceInfo &other) const
 Less than operator for sorting. More...
 
void updateDistance (const Node3D &referenceNode)
 Updates the distance based on a reference node. More...
 

Protected Attributes

float m_distanceSquared
 Distance to light (from reference node). More...
 
LightInfo * m_lightInfo
 Light information referred. More...
 

Detailed Description

Light distance information.

References a LightInfo structure from GatherLightsRenderPass. Adds distance so sorting is possible.

Constructor & Destructor Documentation

◆ LightDistanceInfo()

kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::LightDistanceInfo ( LightInfo &  lightInfo)
explicit

Constructor.

Calculates distance internally.

Parameters
lightInfoGathered light info.

Member Function Documentation

◆ getLightInfo()

LightInfo* kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::getLightInfo ( )
inline

Gets the referred light.

Returns
Pointer to a light info struct.

◆ updateDistance()

void kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::updateDistance ( const Node3D referenceNode)

Updates the distance based on a reference node.

Parameters
referenceNodeNode with which to update the distance.

◆ operator<()

bool kanzi::GatherNearestLightsRenderPass::LightDistanceInfo::operator< ( const LightDistanceInfo other) const
inline

Less than operator for sorting.

Parameters
otherOther distance info compared against.
Returns
True if this is smaller than the counterpart.

Member Data Documentation

◆ 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: