18#ifndef PXR_IMAGING_HD_PRIMVAR_SCHEMA_H
19#define PXR_IMAGING_HD_PRIMVAR_SCHEMA_H
23#include "pxr/imaging/hd/api.h"
25#include "pxr/imaging/hd/schema.h"
30PXR_NAMESPACE_OPEN_SCOPE
35#define HD_PRIMVAR_SCHEMA_TOKENS \
37 (indexedPrimvarValue) \
59 HD_PRIMVAR_SCHEMA_TOKENS);
66class HdPrimvarSchema :
public HdSchema
72 HdPrimvarSchema(HdContainerDataSourceHandle container)
84 HdSampledDataSourceHandle GetPrimvarValue()
const;
87 HdSampledDataSourceHandle GetIndexedPrimvarValue()
const;
92 bool IsIndexed()
const;
109 HdSampledDataSourceHandle GetFlattenedPrimvarValue()
const;
117 HdIntArrayDataSourceHandle GetIndices()
const;
120 HdTokenDataSourceHandle GetInterpolation()
const;
123 HdTokenDataSourceHandle GetRole()
const;
128 HdIntDataSourceHandle GetElementSize()
const;
143 static HdContainerDataSourceHandle
145 const HdSampledDataSourceHandle &primvarValue,
146 const HdSampledDataSourceHandle &indexedPrimvarValue,
147 const HdIntArrayDataSourceHandle &indices,
148 const HdTokenDataSourceHandle &interpolation,
149 const HdTokenDataSourceHandle &role,
150 const HdIntDataSourceHandle &elementSize
164 const HdSampledDataSourceHandle &primvarValue);
166 Builder &SetIndexedPrimvarValue(
167 const HdSampledDataSourceHandle &indexedPrimvarValue);
170 const HdIntArrayDataSourceHandle &indices);
173 const HdTokenDataSourceHandle &interpolation);
176 const HdTokenDataSourceHandle &role);
179 const HdIntDataSourceHandle &elementSize);
183 HdContainerDataSourceHandle
Build();
186 HdSampledDataSourceHandle _primvarValue;
187 HdSampledDataSourceHandle _indexedPrimvarValue;
188 HdIntArrayDataSourceHandle _indices;
189 HdTokenDataSourceHandle _interpolation;
190 HdTokenDataSourceHandle _role;
191 HdIntDataSourceHandle _elementSize;
206 static HdTokenDataSourceHandle BuildInterpolationDataSource(
222 static HdTokenDataSourceHandle BuildRoleDataSource(
228PXR_NAMESPACE_CLOSE_SCOPE
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Token for efficient comparison, assignment, and hashing of known strings.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.