35#ifndef PXR_IMAGING_HD_PRIMVAR_SCHEMA_H
36#define PXR_IMAGING_HD_PRIMVAR_SCHEMA_H
40#include "pxr/imaging/hd/api.h"
42#include "pxr/imaging/hd/schema.h"
47PXR_NAMESPACE_OPEN_SCOPE
52#define HD_PRIMVAR_SCHEMA_TOKENS \
54 (indexedPrimvarValue) \
75 HD_PRIMVAR_SCHEMA_TOKENS);
80class HdPrimvarSchema :
public HdSchema
86 HdPrimvarSchema(HdContainerDataSourceHandle container)
98 HdSampledDataSourceHandle GetPrimvarValue();
101 HdSampledDataSourceHandle GetIndexedPrimvarValue();
123 HdSampledDataSourceHandle GetFlattenedPrimvarValue();
131 HdIntArrayDataSourceHandle GetIndices()
const;
134 HdTokenDataSourceHandle GetInterpolation()
const;
137 HdTokenDataSourceHandle GetRole()
const;
152 static HdContainerDataSourceHandle
154 const HdSampledDataSourceHandle &primvarValue,
155 const HdSampledDataSourceHandle &indexedPrimvarValue,
156 const HdIntArrayDataSourceHandle &indices,
157 const HdTokenDataSourceHandle &interpolation,
158 const HdTokenDataSourceHandle &role
172 const HdSampledDataSourceHandle &primvarValue);
174 Builder &SetIndexedPrimvarValue(
175 const HdSampledDataSourceHandle &indexedPrimvarValue);
178 const HdIntArrayDataSourceHandle &indices);
181 const HdTokenDataSourceHandle &interpolation);
184 const HdTokenDataSourceHandle &role);
188 HdContainerDataSourceHandle
Build();
191 HdSampledDataSourceHandle _primvarValue;
192 HdSampledDataSourceHandle _indexedPrimvarValue;
193 HdIntArrayDataSourceHandle _indices;
194 HdTokenDataSourceHandle _interpolation;
195 HdTokenDataSourceHandle _role;
210 static HdTokenDataSourceHandle BuildInterpolationDataSource(
226 static HdTokenDataSourceHandle BuildRoleDataSource(
232PXR_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.