HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VdfWeightedIterator< IteratorType > Class Template Referencefinal

#include <weightedIterator.h>

+ Inheritance diagram for VdfWeightedIterator< IteratorType >:

Public Types

typedef IteratorType::value_type value_type
 
typedef IteratorType::reference reference
 

Public Member Functions

template<typename... Args>
 VdfWeightedIterator (const VdfContext &context, const TfToken &weightName, Args &&...args)
 
template<typename... Args>
 VdfWeightedIterator (const VdfContext &context, std::initializer_list< TfToken > weightNames, Args &&...args)
 
template<typename... Args>
 VdfWeightedIterator (const VdfContext &context, const std::vector< TfToken > &weightNames, Args &&...args)
 
 ~VdfWeightedIterator ()=default
 
VdfWeightedIteratoroperator++ ()
 
reference operator* () const
 
bool IsAtEnd () const
 
int GetCurrentIndex () const
 
void AdvanceToEnd ()
 
double GetWeight (size_t slot=0, double defWeight=0.0) const
 
bool HasExplicitWeight (size_t slot) const
 
std::pair< bool, double > GetExplicitWeight (size_t slot=0, double defWeight=0.0) const
 
size_t GetNumSlots () const
 
size_t GetNumExplicitWeights (size_t slot=0) const
 

Friends

int Vdf_GetIteratorIndex (const VdfWeightedIterator &it)
 

Additional Inherited Members

- Protected Member Functions inherited from VdfIterator
 ~VdfIterator ()=default
 
const VdfNode_GetNode (const VdfContext &context) const
 
const VdfExecutorInterface_GetExecutor (const VdfContext &context) const
 
VDF_API const VdfVector_GetInputValue (const VdfContext &context, const VdfConnection &connection, const VdfMask &mask) const
 
VDF_API const VdfVector_GetRequiredInputValue (const VdfContext &context, const VdfConnection &connection, const VdfMask &mask) const
 
VDF_API const VdfOutput_GetRequiredOutputForWriting (const VdfContext &context, const TfToken &name) const
 
VDF_API VdfVector_GetOutputValueForWriting (const VdfContext &context, const VdfOutput &output) const
 
VDF_API bool _GetOutputMasks (const VdfContext &context, const VdfOutput &output, const VdfMask **requestMask, const VdfMask **affectsMask) const
 
VDF_API bool _IsRequiredInput (const VdfContext &context, const VdfConnection &connection) const
 
VDF_API const VdfMask_GetRequestMask (const VdfContext &context, const VdfOutput &output) const
 
VDF_API void _ForEachScheduledOutput (const VdfContext &context, const VdfNode &node, const VdfScheduledOutputCallback &callback) const
 

Detailed Description

template<class IteratorType>
class VdfWeightedIterator< IteratorType >

This iterator can be used to iterate through an input that is weighted by one or more weight vectors.

Definition at line 155 of file weightedIterator.h.

Member Typedef Documentation

template<class IteratorType >
typedef IteratorType::reference VdfWeightedIterator< IteratorType >::reference

Type of a reference to a value of this iterator.

Definition at line 165 of file weightedIterator.h.

template<class IteratorType >
typedef IteratorType::value_type VdfWeightedIterator< IteratorType >::value_type

Type of the elements this iterator gives access to.

Definition at line 161 of file weightedIterator.h.

Constructor & Destructor Documentation

template<class IteratorType >
template<typename... Args>
VdfWeightedIterator< IteratorType >::VdfWeightedIterator ( const VdfContext context,
const TfToken weightName,
Args &&...  args 
)
inline

Constructs a weighted iterator using a single weight name.

Definition at line 170 of file weightedIterator.h.

template<class IteratorType >
template<typename... Args>
VdfWeightedIterator< IteratorType >::VdfWeightedIterator ( const VdfContext context,
std::initializer_list< TfToken weightNames,
Args &&...  args 
)
inline

Constructs a weighted iterator using an initializer list for weight names.

Definition at line 183 of file weightedIterator.h.

template<class IteratorType >
template<typename... Args>
VdfWeightedIterator< IteratorType >::VdfWeightedIterator ( const VdfContext context,
const std::vector< TfToken > &  weightNames,
Args &&...  args 
)
inline

Constructs a weighted iterator using a vector for weight names.

Definition at line 194 of file weightedIterator.h.

template<class IteratorType >
VdfWeightedIterator< IteratorType >::~VdfWeightedIterator ( )
default

Destructor.

Member Function Documentation

template<class IteratorType >
void VdfWeightedIterator< IteratorType >::AdvanceToEnd ( )
inline

Advance the iterator to the end.

Definition at line 234 of file weightedIterator.h.

template<class IteratorType >
int VdfWeightedIterator< IteratorType >::GetCurrentIndex ( ) const
inline

Returns the current index for the current connection.

This method should not generally be used.

Definition at line 228 of file weightedIterator.h.

template<class IteratorType >
std::pair< bool, double > VdfWeightedIterator< IteratorType >::GetExplicitWeight ( size_t  slot = 0,
double  defWeight = 0.0 
) const

Returns a pair (bool, double) indicating whether there is a weight explicitly present at the given slot and giving the weight or the given default weight as fallback.

Definition at line 508 of file weightedIterator.h.

template<class IteratorType >
size_t VdfWeightedIterator< IteratorType >::GetNumExplicitWeights ( size_t  slot = 0) const
inline

Returns the # of explicit weights for slot.

Definition at line 270 of file weightedIterator.h.

template<class IteratorType >
size_t VdfWeightedIterator< IteratorType >::GetNumSlots ( ) const
inline

Get the number of weight slots used.

Definition at line 264 of file weightedIterator.h.

template<class IteratorType >
double VdfWeightedIterator< IteratorType >::GetWeight ( size_t  slot = 0,
double  defWeight = 0.0 
) const
inline

Returns the weight at the current element. If no weight is explicitly present at the given slot, defWeight (default is 0.0) is returned.

Definition at line 242 of file weightedIterator.h.

template<class IteratorType >
bool VdfWeightedIterator< IteratorType >::HasExplicitWeight ( size_t  slot) const
inline

Returns true if the weight at the current element is explicitly set at slot.

Definition at line 250 of file weightedIterator.h.

template<class IteratorType >
bool VdfWeightedIterator< IteratorType >::IsAtEnd ( ) const
inline

Returns true if the iterator is done iterating and false otherwise.

Definition at line 220 of file weightedIterator.h.

template<class IteratorType >
reference VdfWeightedIterator< IteratorType >::operator* ( ) const
inline

Returns reference to current element.

Definition at line 214 of file weightedIterator.h.

template<class IteratorType >
VdfWeightedIterator< IteratorType > & VdfWeightedIterator< IteratorType >::operator++ ( )

Increment operator to point to the next element.

Definition at line 409 of file weightedIterator.h.

Friends And Related Function Documentation

template<class IteratorType >
int Vdf_GetIteratorIndex ( const VdfWeightedIterator< IteratorType > &  it)
friend

Definition at line 282 of file weightedIterator.h.


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