Loading...
Searching...
No Matches
rileyPrimvarListSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_RILEY_PRIMVAR_LIST_SCHEMA_H
19#define EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_RILEY_PRIMVAR_LIST_SCHEMA_H
20
22
23#include "hdPrman/api.h"
24#include "hdPrman/rileySchemaTypeDefs.h"
25
26#include "pxr/imaging/hd/schema.h"
27#include "pxr/imaging/hd/version.h"
28
29// --(BEGIN CUSTOM CODE: Includes)--
30// --(END CUSTOM CODE: Includes)--
31
32PXR_NAMESPACE_OPEN_SCOPE
33
34// --(BEGIN CUSTOM CODE: Declares)--
35// --(END CUSTOM CODE: Declares)--
36
37#define HD_PRMAN_RILEY_PRIMVAR_LIST_SCHEMA_TOKENS \
38 (numUniform) \
39 (numVertex) \
40 (numVarying) \
41 (numFaceVarying) \
42 (params) \
43 (P) \
44
45TF_DECLARE_PUBLIC_TOKENS(HdPrmanRileyPrimvarListSchemaTokens, HDPRMAN_API,
46 HD_PRMAN_RILEY_PRIMVAR_LIST_SCHEMA_TOKENS);
47
48//-----------------------------------------------------------------------------
49
50// Schema to describe RtPrimvarList.
51//
52// To obtain an RtPrimvarList we pass numUniform, numVertex, numVarying,
53// numFaceVarying to the constructor, call RtPrimvarList::SetTimes if "P" (for
54// points) is among the params and has samples and finally call the
55// appropriate RtPrimvarList::SetFOO[Detail]( name, value[, detailType[,
56// sampleTimeIndex]]).
57//
58// The HdPrmanRileyPrimvarSchema determines what SetFOO[Detail] method is
59// valled with what value, detailType or sampleTimeIndex.
60//
61// For many data types or when detailType is constant, the behavior is the
62// same as for the HdPrmanRileyParamSchema.
63//
64// Otherweise, we call SetFooDetail using HdPrmanRileyParamSchema similar as
65// we did for HdPrmanRileyParamSchema but consuming the detailType data source
66// as well. The value data source is only sampled at time 0.
67//
68// The "P" param is treated specially. It is the only param for which take
69// time samples (from the sampled value data source) and always corresponds to
70// a call to RtPrimvarList::SetPointDetail with detailType = vertex.
71//
72
73class HdPrmanRileyPrimvarListSchema : public HdSchema
74{
75public:
78
79 HdPrmanRileyPrimvarListSchema(HdContainerDataSourceHandle container)
80 : HdSchema(container) {}
81
83
84// --(BEGIN CUSTOM CODE: Schema Methods)--
85// --(END CUSTOM CODE: Schema Methods)--
86
89
90 HDPRMAN_API
91 HdSizetDataSourceHandle GetNumUniform()
92#if HD_API_VERSION >= 66
93 const;
94#else
95 ;
96#endif
97
98
99 HDPRMAN_API
100 HdSizetDataSourceHandle GetNumVertex()
101#if HD_API_VERSION >= 66
102 const;
103#else
104 ;
105#endif
106
107
108 HDPRMAN_API
109 HdSizetDataSourceHandle GetNumVarying()
110#if HD_API_VERSION >= 66
111 const;
112#else
113 ;
114#endif
115
116
117 HDPRMAN_API
118 HdSizetDataSourceHandle GetNumFaceVarying()
119#if HD_API_VERSION >= 66
120 const;
121#else
122 ;
123#endif
124
125
126 HDPRMAN_API
128#if HD_API_VERSION >= 66
129 const;
130#else
131 ;
132#endif
133
134
136
139
147 HDPRMAN_API
148 static HdContainerDataSourceHandle
149 BuildRetained(
150 const HdSizetDataSourceHandle &numUniform,
151 const HdSizetDataSourceHandle &numVertex,
152 const HdSizetDataSourceHandle &numVarying,
153 const HdSizetDataSourceHandle &numFaceVarying,
154 const HdContainerDataSourceHandle &params
155 );
156
164 {
165 public:
166 HDPRMAN_API
167 Builder &SetNumUniform(
168 const HdSizetDataSourceHandle &numUniform);
169 HDPRMAN_API
170 Builder &SetNumVertex(
171 const HdSizetDataSourceHandle &numVertex);
172 HDPRMAN_API
173 Builder &SetNumVarying(
174 const HdSizetDataSourceHandle &numVarying);
175 HDPRMAN_API
176 Builder &SetNumFaceVarying(
177 const HdSizetDataSourceHandle &numFaceVarying);
178 HDPRMAN_API
179 Builder &SetParams(
180 const HdContainerDataSourceHandle &params);
181
183 HDPRMAN_API
184 HdContainerDataSourceHandle Build();
185
186 private:
187 HdSizetDataSourceHandle _numUniform;
188 HdSizetDataSourceHandle _numVertex;
189 HdSizetDataSourceHandle _numVarying;
190 HdSizetDataSourceHandle _numFaceVarying;
191 HdContainerDataSourceHandle _params;
192
193 };
194
196};
197
198PXR_NAMESPACE_CLOSE_SCOPE
199
200#endif
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HDPRMAN_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Template class for a schema backed by a container whose children have arbitrary names but an expected...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81