Loading...
Searching...
No Matches
VdfRawValueAccessor Class Reference

This class grants special access to the raw VdfVector data associated with inputs and outputs on a VdfNode. More...

#include <rawValueAccessor.h>

+ Inheritance diagram for VdfRawValueAccessor:

Public Member Functions

 VdfRawValueAccessor (const VdfContext &context)
 Constructs a VdfRawValueAccessor from a VdfContext.
 
VDF_API const VdfVectorGetInputVector (const VdfInput &input, VdfMask *mask=nullptr) const
 Returns the first VdfVector at the input for input.
 
VDF_API void SetOutputVector (const VdfOutput &output, const VdfMask &mask, const VdfVector &value)
 Sets the output value to the given value using the passed in mask.
 
VDF_API void SetOutputVector (const VdfOutput &output, const VdfMask &mask, VdfVector &&value)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Additional Inherited Members

- Protected Member Functions inherited from VdfIterator
 ~VdfIterator ()=default
 Disallow destruction via base class pointers.
 
const VdfNode_GetNode (const VdfContext &context) const
 Returns the current node being run.
 
const VdfExecutorInterface_GetExecutor (const VdfContext &context) const
 Returns the executor for the given context.
 
VDF_API const VdfVector_GetInputValue (const VdfContext &context, const VdfConnection &connection, const VdfMask &mask) const
 Returns a vector for reading an input value.
 
VDF_API const VdfVector_GetRequiredInputValue (const VdfContext &context, const VdfConnection &connection, const VdfMask &mask) const
 Returns the cached output value for a given output, or issues an error message if a cache value is not available.
 
VDF_API const VdfOutput_GetRequiredOutputForWriting (const VdfContext &context, const TfToken &name) const
 Returns the output for writing based on the name provided.
 
VDF_API VdfVector_GetOutputValueForWriting (const VdfContext &context, const VdfOutput &output) const
 Returns a vector for writing an output value into.
 
VDF_API bool _GetOutputMasks (const VdfContext &context, const VdfOutput &output, const VdfMask **requestMask, const VdfMask **affectsMask) const
 Retrieves the request and affects masks of the given output.
 
VDF_API bool _IsRequiredInput (const VdfContext &context, const VdfConnection &connection) const
 Returns true when the connection is scheduled and required, and false otherwise.
 
VDF_API const VdfMask_GetRequestMask (const VdfContext &context, const VdfOutput &output) const
 Returns the request mask of output, if the output has been scheduled and NULL otherwise.
 
VDF_API void _ForEachScheduledOutput (const VdfContext &context, const VdfNode &node, const VdfScheduledOutputCallback &callback) const
 Loops over each scheduled output of node and calls callback with the output and request mask in an efficient manner.
 

Detailed Description

This class grants special access to the raw VdfVector data associated with inputs and outputs on a VdfNode.

Note, that input and output data is typically accessed using the VdfContext. In some special cases, nodes may require type-agnostic access to the entire VdfVector stored for a specific input or output.

We do not want this class to be used in typical plugin code (mover, gprims, etc.), thus inputs and outputs are referred to using VdfInput and VdfOutput instances, rather than name tokens. Only classes derived from VdfNode will typically have access to these objects.

Definition at line 39 of file rawValueAccessor.h.

Constructor & Destructor Documentation

◆ VdfRawValueAccessor()

VdfRawValueAccessor ( const VdfContext context)
inline

Constructs a VdfRawValueAccessor from a VdfContext.

Definition at line 45 of file rawValueAccessor.h.

Member Function Documentation

◆ GetInputVector()

VDF_API const VdfVector * GetInputVector ( const VdfInput input,
VdfMask mask = nullptr 
) const

Returns the first VdfVector at the input for input.

Returns nullptr if there is no connection on the supplied input or if the requested input does not exist.

Note, this method purposefully accepts a VdfInput instead of a TfToken, such that it can only be used where VdfInputs are available.

◆ SetOutputVector() [1/2]

VDF_API void SetOutputVector ( const VdfOutput output,
const VdfMask mask,
const VdfVector value 
)

Sets the output value to the given value using the passed in mask.

Note, this method purposefully accepts a VdfOutput instead of a TfToken, such that it can only be used where VdfOutputs are available.

◆ SetOutputVector() [2/2]

VDF_API void SetOutputVector ( const VdfOutput output,
const VdfMask mask,
VdfVector &&  value 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


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