All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdBufferSpec Class Referencefinal

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

Classes

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

Public Member Functions

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

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. More...
 
static HD_API bool IsSubset (HdBufferSpecVector const &subset, HdBufferSpecVector const &superset)
 Returns true if subset is a subset of superset. More...
 
static HD_API HdBufferSpecVector ComputeUnion (HdBufferSpecVector const &spec1, HdBufferSpecVector const &spec2)
 Returns union set of spec1 and spec2. More...
 
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. More...
 
static HD_API void Dump (HdBufferSpecVector const &specs)
 Debug output. More...
 

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 ( TfToken const &  name,
HdTupleType  tupleType 
)
inline

Constructor.

Definition at line 55 of file bufferSpec.h.

Member Function Documentation

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.

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

Returns union set of spec1 and spec2.

Duplicated entries are uniquified.

static HD_API void Dump ( HdBufferSpecVector const &  specs)
static

Debug output.

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.

HD_API size_t Hash ( ) const

Return a size_t hash for this spec.

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.

bool operator< ( HdBufferSpec const &  other) const
inline

Ordering.

Definition at line 111 of file bufferSpec.h.

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

Equality checks.

Definition at line 103 of file bufferSpec.h.


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