This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HdStExtCompPrimvarBufferSource Class Referencefinal

Hd Buffer Source that binds a primvar to a Ext Computation output. More...

#include <extCompPrimvarBufferSource.h>

+ Inheritance diagram for HdStExtCompPrimvarBufferSource:

Public Member Functions

HDST_API HdStExtCompPrimvarBufferSource (const TfToken &primvarName, const HdStExtCompCpuComputationSharedPtr &source, const TfToken &sourceOutputName, const HdTupleType &valueType)
 Constructs a new primvar buffer source called primvarName and binds it to the output called sourceOutputName from the computation identified by source.
 
HDST_API TfToken const & GetName () const override
 Returns the name of the primvar.
 
HDST_API void GetBufferSpecs (HdBufferSpecVector *specs) const override
 Adds this Primvar's buffer description to the buffer spec vector.
 
HDST_API size_t ComputeHash () const override
 Computes and returns a hash value for the underlying data.
 
HDST_API bool Resolve () override
 Extracts the primvar from the source computation.
 
HDST_API void const * GetData () const override
 Returns a raw pointer to the primvar data.
 
HDST_API HdTupleType GetTupleType () const override
 Returns the tuple data format of the primvar data.
 
HDST_API size_t GetNumElements () const override
 Returns a count of the number of elements.
 
- Public Member Functions inherited from HdBufferSource
virtual TfToken const & GetName () const =0
 Return the name of this buffer source.
 
virtual void GetBufferSpecs (HdBufferSpecVector *specs) const =0
 Add the buffer spec for this buffer source into given bufferspec vector.
 
virtual HD_API size_t ComputeHash () const
 Computes and returns a hash value for the underlying data.
 
virtual bool Resolve ()=0
 Prepare the access of GetData().
 
virtual void const * GetData () const =0
 Following interfaces will be called after Resolve.
 
virtual HdTupleType GetTupleType () const =0
 Returns the data type and count (array size) for this buffer source.
 
virtual size_t GetNumElements () const =0
 Returns the number of elements (e.g.
 
bool IsResolved () const
 Returns true it this computation has already been resolved.
 
bool HasResolveError () const
 Returns true if an error occurred during resolve.
 
HD_API bool IsValid () const
 Checks the validity of the source buffer.
 
virtual HD_API bool HasPreChainedBuffer () const
 Returns true if this buffer has a pre-chained buffer.
 
virtual HD_API HdBufferSourceSharedPtr GetPreChainedBuffer () const
 Returns the pre-chained buffer.
 
virtual HD_API bool HasChainedBuffer () const
 Returns true if this buffer has any chained buffer(s)
 
virtual HD_API HdBufferSourceSharedPtrVector GetChainedBuffers () const
 Returns the vector of chained buffers.
 

Protected Member Functions

HDST_API bool _CheckValid () const override
 Returns true if the binding to the source computation was successful.
 
- Protected Member Functions inherited from HdBufferSource
void _SetResolved ()
 Marks this buffer source as resolved.
 
void _SetResolveError ()
 Called during Resolve() to indicate an unrecoverable failure occurred and the results of the computation can not be used.
 
bool _TryLock ()
 Non-blocking lock acquisition.
 
virtual bool _CheckValid () const =0
 Checks the validity of the source buffer.
 

Friends

template<class HashState >
void TfHashAppend (HashState &h, HdStExtCompPrimvarBufferSource const &)
 

Detailed Description

Hd Buffer Source that binds a primvar to a Ext Computation output.

This buffer source is compatible with being bound to a Bar.

Definition at line 28 of file extCompPrimvarBufferSource.h.

Constructor & Destructor Documentation

◆ HdStExtCompPrimvarBufferSource()

HDST_API HdStExtCompPrimvarBufferSource ( const TfToken primvarName,
const HdStExtCompCpuComputationSharedPtr &  source,
const TfToken sourceOutputName,
const HdTupleType valueType 
)

Constructs a new primvar buffer source called primvarName and binds it to the output called sourceOutputName from the computation identified by source.

Default value provides type information for the primvar and may be used in the event of an error.

Member Function Documentation

◆ _CheckValid()

HDST_API bool _CheckValid ( ) const
overrideprotectedvirtual

Returns true if the binding to the source computation was successful.

Implements HdBufferSource.

◆ ComputeHash()

HDST_API size_t ComputeHash ( ) const
overridevirtual

Computes and returns a hash value for the underlying data.

Reimplemented from HdBufferSource.

◆ GetBufferSpecs()

HDST_API void GetBufferSpecs ( HdBufferSpecVector *  specs) const
overridevirtual

Adds this Primvar's buffer description to the buffer spec vector.

Implements HdBufferSource.

◆ GetData()

HDST_API void const * GetData ( ) const
overridevirtual

Returns a raw pointer to the primvar data.

Implements HdBufferSource.

◆ GetName()

HDST_API TfToken const & GetName ( ) const
overridevirtual

Returns the name of the primvar.

Implements HdBufferSource.

◆ GetNumElements()

HDST_API size_t GetNumElements ( ) const
overridevirtual

Returns a count of the number of elements.

Implements HdBufferSource.

◆ GetTupleType()

HDST_API HdTupleType GetTupleType ( ) const
overridevirtual

Returns the tuple data format of the primvar data.

Implements HdBufferSource.

◆ Resolve()

HDST_API bool Resolve ( )
overridevirtual

Extracts the primvar from the source computation.

Implements HdBufferSource.


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