24 #ifndef PXR_IMAGING_HD_VT_BUFFER_SOURCE_H
25 #define PXR_IMAGING_HD_VT_BUFFER_SOURCE_H
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/version.h"
30 #include "pxr/imaging/hd/bufferSource.h"
31 #include "pxr/imaging/hd/types.h"
35 #include "pxr/base/vt/value.h"
41 PXR_NAMESPACE_OPEN_SCOPE
101 virtual void const*
GetData()
const override {
102 return HdGetValueData(_value);
135 void _SetValue(
const VtValue &v,
int arraySize);
155 PXR_NAMESPACE_CLOSE_SCOPE
157 #endif //PXR_IMAGING_HD_VT_BUFFER_SOURCE_H
void _SetResolved()
Marks this buffer source as resolved.
virtual HD_API bool _CheckValid() const override
Checks the validity of the source buffer.
HD_API HdVtBufferSource(TfToken const &name, VtValue const &value, int arraySize=1)
Constructs a new buffer from a VtValue.
HdTupleType represents zero, one, or more values of the same HdType.
virtual bool Resolve() override
Prepare the access of GetData().
Describes each named resource of buffer array.
Token for efficient comparison, assignment, and hashing of known strings.
virtual void GetBufferSpecs(HdBufferSpecVector *specs) const override
Add the buffer spec for this buffer source into given bufferspec vector.
HD_API ~HdVtBufferSource()
Destructor deletes the internal storage.
A transient buffer of data that has not yet been committed.
Stores a 4x4 matrix of double elements.
Represents an arbitrary dimensional rectangular container class.
bool _TryLock()
Non-blocking lock acquisition.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
virtual HD_API size_t GetNumElements() const override
Returns the number of elements (e.g.
virtual TfToken const & GetName() const override
Return the name of this buffer source.
virtual void const * GetData() const override
Returns the raw pointer to the underlying data.
virtual HdTupleType GetTupleType() const override
Returns the data type and count of this buffer source.
HD_API void Truncate(size_t numElements)
Truncate the buffer to the given number of elements.
static HD_API HdType GetDefaultMatrixType()
Returns the default matrix type.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
An implementation of HdBufferSource where the source data value is a VtValue.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...