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

#include <bufferSpec.h>

Classes

struct  HashFunctor
 Functor to use for unordered 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)
 
static HD_API HdBufferSpecVector ComputeUnion (HdBufferSpecVector const &spec1, HdBufferSpecVector const &spec2)
 
static HD_API HdBufferSpecVector ComputeDifference (HdBufferSpecVector const &spec1, HdBufferSpecVector const &spec2)
 
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::HdBufferSpec ( TfToken const name,
HdTupleType  tupleType 
)
inline

Constructor.

Definition at line 55 of file bufferSpec.h.

Member Function Documentation

static HD_API HdBufferSpecVector HdBufferSpec::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.

static HD_API HdBufferSpecVector HdBufferSpec::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.

static HD_API void HdBufferSpec::Dump ( HdBufferSpecVector const specs)
static

Debug output.

template<typename T >
static void HdBufferSpec::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 HdBufferSpec::Hash ( ) const

Return a size_t hash for this spec.

static HD_API bool HdBufferSpec::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 HdBufferSpec::operator!= ( HdBufferSpec const other) const
inline

Definition at line 109 of file bufferSpec.h.

bool HdBufferSpec::operator< ( HdBufferSpec const other) const
inline

Ordering.

Definition at line 114 of file bufferSpec.h.

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

Equality checks.

Definition at line 106 of file bufferSpec.h.

Member Data Documentation

TfToken HdBufferSpec::name

Definition at line 119 of file bufferSpec.h.

HdTupleType HdBufferSpec::tupleType

Definition at line 120 of file bufferSpec.h.


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