7#ifndef PXR_IMAGING_HD_VT_BUFFER_SOURCE_H
8#define PXR_IMAGING_HD_VT_BUFFER_SOURCE_H
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/bufferSource.h"
14#include "pxr/imaging/hd/types.h"
18#include "pxr/base/vt/value.h"
24PXR_NAMESPACE_OPEN_SCOPE
42 int arraySize=1,
bool allowDoubles=
true);
54 bool allowDoubles=
true);
67 int arraySize=1,
bool allowDoubles=
true);
93 return HdGetValueData(_value);
126 void _SetValue(
const VtValue &v,
int arraySize,
bool allowDoubles);
146PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
A transient buffer of data that has not yet been committed.
bool _TryLock()
Non-blocking lock acquisition.
void _SetResolved()
Marks this buffer source as resolved.
An implementation of HdBufferSource where the source data value is a VtValue.
HD_API HdVtBufferSource(TfToken const &name, GfMatrix4d const &matrix, bool allowDoubles=true)
Constructs a new buffer from a matrix.
void const * GetData() const override
Returns the raw pointer to the underlying data.
HD_API HdVtBufferSource(TfToken const &name, VtArray< GfMatrix4d > const &matrices, int arraySize=1, bool allowDoubles=true)
Constructs a new buffer from a matrix.
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.
HD_API bool _CheckValid() const override
Checks the validity of the source buffer.
TfToken const & GetName() const override
Return the name of this buffer source.
bool Resolve() override
Prepare the access of GetData().
void GetBufferSpecs(HdBufferSpecVector *specs) const override
Add the buffer spec for this buffer source into given bufferspec vector.
static HD_API HdType GetDefaultMatrixType()
Returns the default matrix type.
HD_API ~HdVtBufferSource() override
Destructor deletes the internal storage.
HD_API size_t GetNumElements() const override
Returns the number of elements (e.g.
HD_API HdVtBufferSource(TfToken const &name, VtValue const &value, int arraySize=1, bool allowDoubles=true)
Constructs a new buffer from a VtValue.
Token for efficient comparison, assignment, and hashing of known strings.
Represents an arbitrary dimensional rectangular container class.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Describes each named resource of buffer array.
HdTupleType represents zero, one, or more values of the same HdType.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...