HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdComputedBufferSource Class Reference

#include <bufferSource.h>

+ Inheritance diagram for HdComputedBufferSource:

Public Member Functions

virtual HD_API TfToken const & GetName () const override
 Return the name of this buffer source. More...
 
virtual HD_API size_t ComputeHash () const override
 Computes and returns a hash value for the underlying data. More...
 
virtual HD_API void const * GetData () const override
 Following interfaces will be called after Resolve. More...
 
virtual HD_API HdTupleType GetTupleType () const override
 Returns the data type and count (array size) for this buffer source. More...
 
virtual HD_API size_t GetNumElements () const override
 
- Public Member Functions inherited from HdBufferSource
 HdBufferSource ()
 
virtual HD_API ~HdBufferSource ()
 
virtual void GetBufferSpecs (HdBufferSpecVector *specs) const =0
 
virtual bool Resolve ()=0
 
bool IsResolved () const
 Returns true it this computation has already been resolved. More...
 
bool HasResolveError () const
 Returns true if an error occurred during resolve. More...
 
HD_API bool IsValid () const
 
virtual HD_API bool HasPreChainedBuffer () const
 Returns true if this buffer has a pre-chained buffer. More...
 
virtual HD_API
HdBufferSourceSharedPtr 
GetPreChainedBuffer () const
 Returns the pre-chained buffer. More...
 
virtual HD_API bool HasChainedBuffer () const
 Returns true if this buffer has any chained buffer(s) More...
 
virtual HD_API
HdBufferSourceSharedPtrVector 
GetChainedBuffers () const
 Returns the vector of chained buffers. More...
 

Protected Member Functions

void _SetResult (HdBufferSourceSharedPtr const &result)
 
- Protected Member Functions inherited from HdBufferSource
void _SetResolved ()
 
void _SetResolveError ()
 
bool _TryLock ()
 
virtual bool _CheckValid () const =0
 

Detailed Description

A abstract base class for cpu computation followed by buffer transfer to the GPU.

concrete class needs to implement virtual void GetBufferSpecs(HdBufferSpecVector *specs) const; virtual void Resolve(); and set the result via _SetResult().

Definition at line 213 of file bufferSource.h.

Member Function Documentation

void HdComputedBufferSource::_SetResult ( HdBufferSourceSharedPtr const &  result)
inlineprotected

Definition at line 227 of file bufferSource.h.

virtual HD_API size_t HdComputedBufferSource::ComputeHash ( ) const
overridevirtual

Computes and returns a hash value for the underlying data.

Reimplemented from HdBufferSource.

virtual HD_API void const* HdComputedBufferSource::GetData ( ) const
overridevirtual

Following interfaces will be called after Resolve.

Returns the raw pointer to the underlying data.

Implements HdBufferSource.

virtual HD_API TfToken const& HdComputedBufferSource::GetName ( ) const
overridevirtual

Return the name of this buffer source.

Implements HdBufferSource.

Reimplemented in HdSt_SmoothNormalsComputationCPU, and HdSt_FlatNormalsComputationCPU.

virtual HD_API size_t HdComputedBufferSource::GetNumElements ( ) const
overridevirtual

Returns the number of elements (e.g. VtVec3dArray().GetLength()) from the source array.

Implements HdBufferSource.

virtual HD_API HdTupleType HdComputedBufferSource::GetTupleType ( ) const
overridevirtual

Returns the data type and count (array size) for this buffer source.

Implements HdBufferSource.


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