Loading...
Searching...
No Matches
HdBufferSpec Class Referencefinal

Describes each named resource of buffer array. More...

#include <bufferSpec.h>

Classes

struct  HashFunctor
 Functor to use for unordered sets, maps. More...
 

Public Member Functions

 HdBufferSpec (TfToken const &name, HdTupleType tupleType)
 Constructor.
 
HD_API size_t Hash () const
 Return a size_t hash for this spec.
 
bool operator== (HdBufferSpec const &other) const
 Equality checks.
 
bool operator!= (HdBufferSpec const &other) const
 
bool operator< (HdBufferSpec const &other) const
 Ordering.
 

Static Public Member Functions

template<typename T >
static void GetBufferSpecs (T const &sources, HdBufferSpecVector *bufferSpecs)
 Util function for adding buffer specs of sources into bufferspecs.
 
static HD_API bool IsSubset (HdBufferSpecVector const &subset, HdBufferSpecVector const &superset)
 Returns true if subset is a subset of superset.
 
static HD_API HdBufferSpecVector ComputeUnion (HdBufferSpecVector const &spec1, HdBufferSpecVector const &spec2)
 Returns union set of spec1 and spec2.
 
static HD_API HdBufferSpecVector ComputeDifference (HdBufferSpecVector const &spec1, HdBufferSpecVector const &spec2)
 Returns difference set of spec1 and spec2, i.e., entries in spec1 that are not in spec2.
 
static HD_API void Dump (HdBufferSpecVector const &specs)
 Debug output.
 

Public Attributes

TfToken name
 
HdTupleType tupleType
 

Detailed Description

Describes each named resource of buffer array.

This specifies the buffer's value type as HdTupleType, which specifies the value type, number of components, and number of array entries (which may be 1).

for example: HdBufferSpecVector 0: name = points, tupleType = {HdTypeFloatVec3, 1} 1: name = normals, tupleType = {HdTypeFloatVec3, 1} 2: name = colors, tupleType = {HdTypeFloatVec3, 1}

Definition at line 53 of file bufferSpec.h.

Constructor & Destructor Documentation

◆ HdBufferSpec()

HdBufferSpec ( TfToken const &  name,
HdTupleType  tupleType 
)
inline

Constructor.

Definition at line 55 of file bufferSpec.h.

Member Function Documentation

◆ ComputeDifference()

static HD_API HdBufferSpecVector ComputeDifference ( HdBufferSpecVector const &  spec1,
HdBufferSpecVector const &  spec2 
)
static

Returns difference set of spec1 and spec2, i.e., entries in spec1 that are not in spec2.

Duplicated entries are uniquified. The order of items in spec1 is preserved.

◆ ComputeUnion()

static HD_API HdBufferSpecVector ComputeUnion ( HdBufferSpecVector const &  spec1,
HdBufferSpecVector const &  spec2 
)
static

Returns union set of spec1 and spec2.

Duplicated entries are uniquified. The order of items in spec1 and spec2 are preserved relative to themselves respectively in the result, with items in spec1 appearing first.

◆ Dump()

static HD_API void Dump ( HdBufferSpecVector const &  specs)
static

Debug output.

◆ GetBufferSpecs()

static void GetBufferSpecs ( T const &  sources,
HdBufferSpecVector *  bufferSpecs 
)
inlinestatic

Util function for adding buffer specs of sources into bufferspecs.

Definition at line 60 of file bufferSpec.h.

◆ Hash()

HD_API size_t Hash ( ) const

Return a size_t hash for this spec.

◆ IsSubset()

static HD_API bool IsSubset ( HdBufferSpecVector const &  subset,
HdBufferSpecVector const &  superset 
)
static

Returns true if subset is a subset of superset.

An empty set is considered a valid subset of the superset.

◆ operator!=()

bool operator!= ( HdBufferSpec const &  other) const
inline

Definition at line 109 of file bufferSpec.h.

◆ operator<()

bool operator< ( HdBufferSpec const &  other) const
inline

Ordering.

Definition at line 114 of file bufferSpec.h.

◆ operator==()

bool operator== ( HdBufferSpec const &  other) const
inline

Equality checks.

Definition at line 106 of file bufferSpec.h.

Member Data Documentation

◆ name

TfToken name

Definition at line 119 of file bufferSpec.h.

◆ tupleType

HdTupleType tupleType

Definition at line 120 of file bufferSpec.h.


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