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) \
58 HD_PRIMVAR_SCHEMA_TOKENS);
63class HdPrimvarSchema :
public HdSchema
69 HdPrimvarSchema(HdContainerDataSourceHandle container)
81 HdSampledDataSourceHandle GetPrimvarValue();
84 HdSampledDataSourceHandle GetIndexedPrimvarValue();
106 HdSampledDataSourceHandle GetFlattenedPrimvarValue();
114 HdIntArrayDataSourceHandle GetIndices()
const;
117 HdTokenDataSourceHandle GetInterpolation()
const;
120 HdTokenDataSourceHandle GetRole()
const;
135 static HdContainerDataSourceHandle
137 const HdSampledDataSourceHandle &primvarValue,
138 const HdSampledDataSourceHandle &indexedPrimvarValue,
139 const HdIntArrayDataSourceHandle &indices,
140 const HdTokenDataSourceHandle &interpolation,
141 const HdTokenDataSourceHandle &role
155 const HdSampledDataSourceHandle &primvarValue);
157 Builder &SetIndexedPrimvarValue(
158 const HdSampledDataSourceHandle &indexedPrimvarValue);
161 const HdIntArrayDataSourceHandle &indices);
164 const HdTokenDataSourceHandle &interpolation);
167 const HdTokenDataSourceHandle &role);
171 HdContainerDataSourceHandle
Build();
174 HdSampledDataSourceHandle _primvarValue;
175 HdSampledDataSourceHandle _indexedPrimvarValue;
176 HdIntArrayDataSourceHandle _indices;
177 HdTokenDataSourceHandle _interpolation;
178 HdTokenDataSourceHandle _role;
193 static HdTokenDataSourceHandle BuildInterpolationDataSource(
209 static HdTokenDataSourceHandle BuildRoleDataSource(
215PXR_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.