Loading...
Searching...
No Matches
rawValueAccessor.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_EXEC_VDF_RAW_VALUE_ACCESSOR_H
8#define PXR_EXEC_VDF_RAW_VALUE_ACCESSOR_H
9
11
12#include "pxr/pxr.h"
13
14#include "pxr/exec/vdf/api.h"
16
17PXR_NAMESPACE_OPEN_SCOPE
18
19class VdfContext;
20class VdfInput;
21class VdfMask;
22class VdfOutput;
23class VdfVector;
24
40{
41public:
42
45 VdfRawValueAccessor(const VdfContext &context) : _context(context) {}
46
54 VDF_API
56 const VdfInput &input,
57 VdfMask *mask = nullptr) const;
58
65 VDF_API
67 const VdfOutput &output,
68 const VdfMask &mask,
69 const VdfVector &value);
70
73 VDF_API
75 const VdfOutput &output,
76 const VdfMask &mask,
77 VdfVector &&value);
78
79private:
80
81 // Common implementation of SetOutputVector overloads.
82 template <typename Vector>
83 void _SetOutputVector(
84 const VdfOutput &output,
85 const VdfMask &mask,
86 Vector &&value);
87
88private:
89
90 // The context used to access the input/output data.
91 const VdfContext &_context;
92
93};
94
95PXR_NAMESPACE_CLOSE_SCOPE
96
97#endif
A context is the parameter bundle passed to callbacks of computations.
Definition: context.h:40
A VdfInput is used to connect a VdfNode to one or more VdfNodes' outputs.
Definition: input.h:36
Base class for libVdf iterators.
Definition: iterator.h:36
A VdfMask is placed on connections to specify the data flowing through them.
Definition: mask.h:37
A VdfOutput represents an output on a node.
Definition: output.h:32
This class grants special access to the raw VdfVector data associated with inputs and outputs on a Vd...
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 o...
VDF_API const VdfVector * GetInputVector(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.
VdfRawValueAccessor(const VdfContext &context)
Constructs a VdfRawValueAccessor from a VdfContext.
This class is used to abstract away knowledge of the cache data used for each node.
Definition: vector.h:56