Blender V5.3
Reservoir< T > Struct Template Reference

#include <eevee_nodetree_closures_lib.bsl.hh>

Public Member Functions

void reset (float rng)
void add (T candidate, float candidate_weight)
float get_final_weight () const

Public Attributes

T data
float rand
float chosen_weight
float total_weight

Detailed Description

template<typename T>
struct Reservoir< T >

Definition at line 13 of file eevee_nodetree_closures_lib.bsl.hh.

Member Function Documentation

◆ add()

template<typename T>
void Reservoir< T >::add ( T candidate,
float candidate_weight )
inline

Definition at line 27 of file eevee_nodetree_closures_lib.bsl.hh.

References chosen_weight, data, rand, T, total_weight, and x.

Referenced by closure_select().

◆ get_final_weight()

template<typename T>
float Reservoir< T >::get_final_weight ( ) const
inline

Definition at line 46 of file eevee_nodetree_closures_lib.bsl.hh.

References chosen_weight, and total_weight.

Referenced by ShadingData::closure_get_resolved().

◆ reset()

template<typename T>
void Reservoir< T >::reset ( float rng)
inline

Definition at line 19 of file eevee_nodetree_closures_lib.bsl.hh.

References data, and T.

Referenced by closure_weights_reset().

Member Data Documentation

◆ chosen_weight

template<typename T>
float Reservoir< T >::chosen_weight

Definition at line 16 of file eevee_nodetree_closures_lib.bsl.hh.

Referenced by add(), and get_final_weight().

◆ data

template<typename T>
T Reservoir< T >::data

◆ rand

template<typename T>
float Reservoir< T >::rand

Definition at line 15 of file eevee_nodetree_closures_lib.bsl.hh.

Referenced by add().

◆ total_weight

template<typename T>
float Reservoir< T >::total_weight

Definition at line 17 of file eevee_nodetree_closures_lib.bsl.hh.

Referenced by add(), and get_final_weight().


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