Kanzi 3.9.10
kanzi::GatherNearestLightsRenderPass::NearestLightRange Class Reference

Nearest light range is an extension to light range that returns the lights in distance order to caller. More...

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

Inheritance diagram for kanzi::GatherNearestLightsRenderPass::NearestLightRange:
[legend]

Classes

class  NearestLightRangeLocation
 Light range location implementation. More...
 

Public Member Functions

bool isOrderDirty () const
 Indicates whether the light order is dirty and needs recalculation.
 
void setOrderDirty ()
 Queue notification for the light range.
 
 ~NearestLightRange ()
 Destructor.
 
- Public Member Functions inherited from kanzi::TypedValueRange< LightDistanceInfo >
iterator begin ()
 Gets an iterator to the beginning of the range.
 
const_iterator begin () const
 Gets an iterator to the beginning of the range.
 
const_iterator cbegin () const
 Gets an iterator to the beginning of the range.
 
const_iterator cend () const
 Gets an iterator to the end of the range.
 
void clear ()
 Clears all values from internal storage.
 
iterator end ()
 Gets an iterator to the end of the range.
 
const_iterator end () const
 Gets an iterator to the end of the range.
 
vector< LightDistanceInfo >::reference operator[] (size_t index)
 Access operator.
 
vector< LightDistanceInfo >::const_reference operator[] (size_t index) const
 Const access operator.
 
void push_back (const LightDistanceInfo &value)
 Appends a value to the end of internal storage.
 
void push_back (LightDistanceInfo &&value)
 Appends a value to the end of internal storage.
 
void setValue (size_t index, const LightDistanceInfo &value)
 Sets a value to the internal storage index.
 
size_t size () const
 Tells the number of elements in the range.
 
- Public Member Functions inherited from kanzi::AbstractIndexedRange
PropertyObjectSharedPtr getPropertyObjectByIndex (size_t index)
 Gets a property object by index.
 
bool getPropertyValueByIndex (size_t index, AbstractPropertyType propertyType, Variant &value)
 Access a property in a property object at an index.
 
size_t getSize ()
 Gets the size of the indexed range.
 
bool getValueByIndex (size_t index, Variant &value)
 Reads a value by index and writes it to a variant.
 
- Public Member Functions inherited from kanzi::AbstractRange
bool adaptView (AbstractRange &potentialViewRange, size_t length)
 Attempts to reuse a view over this range.
 
AbstractRangeIterator beginIteration ()
 Gets an iterator to the beginning of this range.
 
AbstractRangeSharedPtr createView (size_t length)
 Creates a view over this range.
 
AbstractRangeSharedPtr evaluate ()
 Evaluate the abstract range.
 
AbstractRangeLocationPtr locationBegin ()
 Gets an iteratable location to beginning of the range.
 
virtual ~AbstractRange ()=default
 Destructor.
 

Static Public Member Functions

static shared_ptr< NearestLightRangecreate (LightRangeSharedPtr lightRange)
 Creates a new nearest light range.
 
static shared_ptr< NearestLightRangecreate (LightRangeSharedPtr lightRange, Node3DSharedPtr referenceNode)
 Creates a new nearest light range.
 
- Static Public Member Functions inherited from kanzi::TypedValueRange< LightDistanceInfo >
static shared_ptr< TypedValueRangecreate ()
 Creates a new typed value range.
 

Protected Member Functions

 NearestLightRange (LightRangeSharedPtr lightRange, Node3DSharedPtr referenceNode)
 Default Constructor.
 
void sortLights ()
 Sort the lights according to the already-stored distance.
 
- Protected Member Functions inherited from kanzi::TypedValueRange< LightDistanceInfo >
PropertyObjectSharedPtr getPropertyObjectByIndexOverride (size_t index) override
 AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation.
 
bool getPropertyValueByIndexOverride (size_t index, AbstractPropertyType propertyType, Variant &value) override
 AbstractIndexedRange::getPropertyValueByIndexOverride() implementation.
 
size_t getSizeOverride () override
 AbstractIndexedRange::getSizeOverride() implementation.
 
bool getValueByIndexOverride (size_t index, Variant &value) override
 AbstractIndexedRange::getValueByIndexOverride() implementation.
 
AbstractRangeLocationPtr locationBeginOverride () override
 AbstractRange::locationBeginOverride() implementation.
 
 TypedValueRange ()=default
 Default constructor.
 
- Protected Member Functions inherited from kanzi::AbstractIndexedRange
bool adaptViewOverride (AbstractRange &potentialViewRange, size_t length) override
 AbstractRange::adaptViewOverride() implementation.
 
AbstractRangeSharedPtr createViewOverride (size_t length) override
 AbstractRange::createViewOverride() implementation.
 
- Protected Member Functions inherited from kanzi::AbstractRange
 AbstractRange ()=default
 Constructor.
 
virtual AbstractRangeSharedPtr evaluateOverride ()
 Implementation-dependent evaluation of the range.
 

Protected Attributes

LightRangeWeakPtr m_lightRange
 Source light range.
 
bool m_orderDirty
 Flag for indicating whether or not the ordering in this light range is dirty.
 
Node3DWeakPtr m_referenceNode
 Reference to a node.
 
- Protected Attributes inherited from kanzi::TypedValueRange< LightDistanceInfo >
vector< LightDistanceInfo > m_values
 Container for single type of value.
 

Additional Inherited Members

- Public Types inherited from kanzi::TypedValueRange< LightDistanceInfo >
using const_iterator
 Const iterator type for values.
 
using iterator
 Iterator type for values.
 

Detailed Description

Nearest light range is an extension to light range that returns the lights in distance order to caller.

Constructor & Destructor Documentation

◆ ~NearestLightRange()

kanzi::GatherNearestLightsRenderPass::NearestLightRange::~NearestLightRange ( )

Destructor.

◆ NearestLightRange()

kanzi::GatherNearestLightsRenderPass::NearestLightRange::NearestLightRange ( LightRangeSharedPtr lightRange,
Node3DSharedPtr referenceNode )
explicitprotected

Default Constructor.

Parameters
lightRangeLight range referenced.
referenceNodeReference node for the sorting.

Member Function Documentation

◆ create() [1/2]

static shared_ptr< NearestLightRange > kanzi::GatherNearestLightsRenderPass::NearestLightRange::create ( LightRangeSharedPtr lightRange,
Node3DSharedPtr referenceNode )
static

Creates a new nearest light range.

Parameters
lightRangeLight range referenced.
referenceNodeReference node for the sorting.

◆ create() [2/2]

static shared_ptr< NearestLightRange > kanzi::GatherNearestLightsRenderPass::NearestLightRange::create ( LightRangeSharedPtr lightRange)
inlinestatic

Creates a new nearest light range.

Parameters
lightRangeLight range referenced.

◆ isOrderDirty()

bool kanzi::GatherNearestLightsRenderPass::NearestLightRange::isOrderDirty ( ) const
inline

Indicates whether the light order is dirty and needs recalculation.

Returns
If the ordering is dirty, true, false otherwise.

◆ setOrderDirty()

void kanzi::GatherNearestLightsRenderPass::NearestLightRange::setOrderDirty ( )
inline

Queue notification for the light range.

When you call this function, the next execution of the Gather Nearest Lights Render Pass notifies the range.

◆ sortLights()

void kanzi::GatherNearestLightsRenderPass::NearestLightRange::sortLights ( )
protected

Sort the lights according to the already-stored distance.

This function does nothing if the order is not dirty or if the

Member Data Documentation

◆ m_lightRange

LightRangeWeakPtr kanzi::GatherNearestLightsRenderPass::NearestLightRange::m_lightRange
protected

Source light range.

◆ m_referenceNode

Node3DWeakPtr kanzi::GatherNearestLightsRenderPass::NearestLightRange::m_referenceNode
protected

Reference to a node.

◆ m_orderDirty

bool kanzi::GatherNearestLightsRenderPass::NearestLightRange::m_orderDirty
protected

Flag for indicating whether or not the ordering in this light range is dirty.


The documentation for this class was generated from the following file: