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) \
60 HD_PRIMVAR_SCHEMA_TOKENS);
67class HdPrimvarSchema :
public HdSchema
73 HdPrimvarSchema(HdContainerDataSourceHandle container)
85 HdSampledDataSourceHandle GetPrimvarValue()
const;
88 HdSampledDataSourceHandle GetIndexedPrimvarValue()
const;
93 bool IsIndexed()
const;
110 HdSampledDataSourceHandle GetFlattenedPrimvarValue()
const;
118 HdIntArrayDataSourceHandle GetIndices()
const;
121 HdTokenDataSourceHandle GetInterpolation()
const;
124 HdTokenDataSourceHandle GetRole()
const;
127 HdTokenDataSourceHandle GetColorSpace()
const;
132 HdIntDataSourceHandle GetElementSize()
const;
147 static HdContainerDataSourceHandle
149 const HdSampledDataSourceHandle &primvarValue,
150 const HdSampledDataSourceHandle &indexedPrimvarValue,
151 const HdIntArrayDataSourceHandle &indices,
152 const HdTokenDataSourceHandle &interpolation,
153 const HdTokenDataSourceHandle &role,
154 const HdTokenDataSourceHandle &colorSpace,
155 const HdIntDataSourceHandle &elementSize
169 const HdSampledDataSourceHandle &primvarValue);
171 Builder &SetIndexedPrimvarValue(
172 const HdSampledDataSourceHandle &indexedPrimvarValue);
175 const HdIntArrayDataSourceHandle &indices);
178 const HdTokenDataSourceHandle &interpolation);
181 const HdTokenDataSourceHandle &role);
184 const HdTokenDataSourceHandle &colorSpace);
187 const HdIntDataSourceHandle &elementSize);
191 HdContainerDataSourceHandle
Build();
194 HdSampledDataSourceHandle _primvarValue;
195 HdSampledDataSourceHandle _indexedPrimvarValue;
196 HdIntArrayDataSourceHandle _indices;
197 HdTokenDataSourceHandle _interpolation;
198 HdTokenDataSourceHandle _role;
199 HdTokenDataSourceHandle _colorSpace;
200 HdIntDataSourceHandle _elementSize;
215 static HdTokenDataSourceHandle BuildInterpolationDataSource(
231 static HdTokenDataSourceHandle BuildRoleDataSource(
237PXR_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.