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

Light distance information. More...

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

Public Member Functions

const LightgetLight () const
 Gets the referred light. More...
 
 LightDistanceInfo (const LightInfo &lightInfo, const Node3D &referenceNode)
 Constructor. More...
 
bool operator< (const LightDistanceInfo &other) const
 Less than operator for sorting. More...
 

Public Attributes

float m_distanceSquared
 Distance to light (from reference node). More...
 
const LightInfom_lightInfo
 Light reference. More...
 

Detailed Description

Light distance information.

Constructor & Destructor Documentation

kanzi::GatherNearestLightsRenderPass::NearestLightRange::LightDistanceInfo::LightDistanceInfo ( const LightInfo lightInfo,
const Node3D referenceNode 
)
explicit

Constructor.

Calculates distance internally.

Parameters
lightInfoLight information structure.
referenceNodeReference node to calculate distance to.

Member Function Documentation

const Light* kanzi::GatherNearestLightsRenderPass::NearestLightRange::LightDistanceInfo::getLight ( ) const
inline

Gets the referred light.

Returns
Light reference.
bool kanzi::GatherNearestLightsRenderPass::NearestLightRange::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

const LightInfo* kanzi::GatherNearestLightsRenderPass::NearestLightRange::LightDistanceInfo::m_lightInfo

Light reference.

float kanzi::GatherNearestLightsRenderPass::NearestLightRange::LightDistanceInfo::m_distanceSquared

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: