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);
64class HdPrimvarSchema :
public HdSchema
70 HdPrimvarSchema(HdContainerDataSourceHandle container)
82 HdSampledDataSourceHandle GetPrimvarValue()
const;
85 HdSampledDataSourceHandle GetIndexedPrimvarValue()
const;
90 bool IsIndexed()
const;
107 HdSampledDataSourceHandle GetFlattenedPrimvarValue()
const;
115 HdIntArrayDataSourceHandle GetIndices()
const;
118 HdTokenDataSourceHandle GetInterpolation()
const;
121 HdTokenDataSourceHandle GetRole()
const;
126 HdIntDataSourceHandle GetElementSize()
const;
141 static HdContainerDataSourceHandle
143 const HdSampledDataSourceHandle &primvarValue,
144 const HdSampledDataSourceHandle &indexedPrimvarValue,
145 const HdIntArrayDataSourceHandle &indices,
146 const HdTokenDataSourceHandle &interpolation,
147 const HdTokenDataSourceHandle &role,
148 const HdIntDataSourceHandle &elementSize
162 const HdSampledDataSourceHandle &primvarValue);
164 Builder &SetIndexedPrimvarValue(
165 const HdSampledDataSourceHandle &indexedPrimvarValue);
168 const HdIntArrayDataSourceHandle &indices);
171 const HdTokenDataSourceHandle &interpolation);
174 const HdTokenDataSourceHandle &role);
177 const HdIntDataSourceHandle &elementSize);
181 HdContainerDataSourceHandle
Build();
184 HdSampledDataSourceHandle _primvarValue;
185 HdSampledDataSourceHandle _indexedPrimvarValue;
186 HdIntArrayDataSourceHandle _indices;
187 HdTokenDataSourceHandle _interpolation;
188 HdTokenDataSourceHandle _role;
189 HdIntDataSourceHandle _elementSize;
204 static HdTokenDataSourceHandle BuildInterpolationDataSource(
220 static HdTokenDataSourceHandle BuildRoleDataSource(
226PXR_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.