Kanzi Engine API
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  LightDistanceInfo
 Light distance information. More...
 

Public Member Functions

bool hasNotificationQueued () const
 Indicates whether the light range has queued notifications. More...
 
 NearestLightRange (GatherLightsRenderPass &renderPass, Object *object, string_view name, string_view param)
 Constructor. More...
 
void queueNotify ()
 Queue notification for the light range. More...
 
 ~NearestLightRange ()
 Destructor. More...
 
- Public Member Functions inherited from kanzi::GatherLightsRenderPass::LightRange
 LightRange (GatherLightsRenderPass &renderPass, Object *object, string_view name, string_view param)
 Constructor. More...
 
- Public Member Functions inherited from kanzi::ValueRange
bool getValue (Variant &value, size_t index)
 Gets a value from the range by index. More...
 
 ValueRange (string_view name)
 Constructor. More...
 
- Public Member Functions inherited from kanzi::ObservableRange
void addNotification (void *data, NotificationFunction func)
 Sets the notification function. More...
 
string getName () const
 Gets the name of the iterator. More...
 
bool hasNotification (void *data, NotificationFunction func) const
 Tells if given notification exists. More...
 
void invalidate ()
 Invalidates the range. More...
 
bool isNamed (string_view name) const
 Checks whether the name of the iterator matches a given name. More...
 
bool isValid ()
 Checks whether the iterator is valid. More...
 
void notify ()
 Notifies the iterator about the iteration contents having changed. More...
 
 ObservableRange (string_view name)
 Constructor. More...
 
void removeNotification (void *data, NotificationFunction func)
 Removes a notification function. More...
 
void setRangeProducerReference (ObservableRangeProducerSharedPtr factory)
 Sets the factory reference for the observable range. More...
 
virtual ~ObservableRange ()=default
 Destructor. More...
 

Protected Member Functions

bool getValueOverride (Variant &value, size_t index) override
 ValueRange::getValueOverride() implementation. More...
 
void notifyOverride () override
 ObservableRange::notifyOverride() implementation. More...
 

Protected Attributes

vector< LightDistanceInfom_distanceInfo
 Internal information about lights in relation to the reference object. More...
 
bool m_notifyQueued
 Indicates whether this light range has been invalidated and should be triggered by the execution of the Gather Nearest Lights Render Pass. More...
 
- Protected Attributes inherited from kanzi::GatherLightsRenderPass::LightRange
Light::Type m_lightType
 Light type. More...
 
string m_params
 Render value name (applicable if property type is not set). More...
 
AbstractPropertyType m_propertyType
 Property to get. More...
 
weak_ptr< Node3Dm_referenceObject
 Reference object. More...
 
GatherLightsRenderPassm_renderPass
 Gather Lights Render Pass that owns the light range. More...
 
- Protected Attributes inherited from kanzi::ObservableRange
ObservableRangeProducerWeakPtr m_factory
 Iterator factory that created this iterator. More...
 
string m_name
 Identifying iterator name. More...
 
vector< NotificationInfo > m_notifications
 Functions to call when notified. More...
 

Detailed Description

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

Constructor & Destructor Documentation

kanzi::GatherNearestLightsRenderPass::NearestLightRange::NearestLightRange ( GatherLightsRenderPass renderPass,
Object object,
string_view  name,
string_view  param 
)
explicit

Constructor.

Parameters
renderPassThe Gather Lights Render Pass that owns the Light Iterator.
objectThe object querying the range.
nameRange name.
paramRange parameter identifier.
kanzi::GatherNearestLightsRenderPass::NearestLightRange::~NearestLightRange ( )

Destructor.

Member Function Documentation

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

Indicates whether the light range has queued notifications.

Returns
If the light range has queued notifications, true, otherwise false.
void kanzi::GatherNearestLightsRenderPass::NearestLightRange::queueNotify ( )
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.

void kanzi::GatherNearestLightsRenderPass::NearestLightRange::notifyOverride ( )
overrideprotectedvirtual

ObservableRange::notifyOverride() implementation.

Reimplemented from kanzi::ObservableRange.

bool kanzi::GatherNearestLightsRenderPass::NearestLightRange::getValueOverride ( Variant value,
size_t  index 
)
overrideprotectedvirtual

Member Data Documentation

vector<LightDistanceInfo> kanzi::GatherNearestLightsRenderPass::NearestLightRange::m_distanceInfo
protected

Internal information about lights in relation to the reference object.

Cleared whenever anything is modified, recreated when range is accessed.

bool kanzi::GatherNearestLightsRenderPass::NearestLightRange::m_notifyQueued
protected

Indicates whether this light range has been invalidated and should be triggered by the execution of the Gather Nearest Lights Render Pass.


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