Loading...
Searching...
No Matches
extComputationPrimvarSchema.h
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
25
26/* ************************************************************************** */
27/* ** ** */
28/* ** This file is generated by a script. ** */
29/* ** ** */
30/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
31/* ** Edit hdGen/schema.py instead to make changes. ** */
32/* ** ** */
33/* ************************************************************************** */
34
35#ifndef PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
36#define PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
37
38#include "pxr/imaging/hd/api.h"
39
40#include "pxr/imaging/hd/primvarSchema.h"
41
42
43PXR_NAMESPACE_OPEN_SCOPE
44
45//-----------------------------------------------------------------------------
46
47#define HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS \
48 (interpolation) \
49 (role) \
50 (sourceComputation) \
51 (sourceComputationOutputName) \
52 (valueType) \
53
54TF_DECLARE_PUBLIC_TOKENS(HdExtComputationPrimvarSchemaTokens, HD_API,
55 HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS);
56
57//-----------------------------------------------------------------------------
58
59class HdExtComputationPrimvarSchema : public HdSchema
60{
61public:
62 HdExtComputationPrimvarSchema(HdContainerDataSourceHandle container)
63 : HdSchema(container) {}
64
65// --(BEGIN CUSTOM CODE: Schema Methods)--
66
67 // these return statically allocated instances for the common cases.
68 static HdTokenDataSourceHandle BuildInterpolationDataSource(
69 TfToken interpolation) {
70 return HdPrimvarSchema::BuildInterpolationDataSource(interpolation);
71 }
72
73 static HdTokenDataSourceHandle BuildRoleDataSource(TfToken role) {
74 return HdPrimvarSchema::BuildRoleDataSource(role);
75 }
76
77// --(END CUSTOM CODE: Schema Methods)--
78
79 //ACCESSORS
80
81 HD_API
82 HdTokenDataSourceHandle GetInterpolation();
83 HD_API
84 HdTokenDataSourceHandle GetRole();
85 HD_API
86 HdPathDataSourceHandle GetSourceComputation();
87 HD_API
88 HdTokenDataSourceHandle GetSourceComputationOutputName();
89 HD_API
90 HdTupleTypeDataSourceHandle GetValueType();
91
92 // RETRIEVING AND CONSTRUCTING
93
99 HD_API
100 static HdContainerDataSourceHandle
101 BuildRetained(
102 const HdTokenDataSourceHandle &interpolation,
103 const HdTokenDataSourceHandle &role,
104 const HdPathDataSourceHandle &sourceComputation,
105 const HdTokenDataSourceHandle &sourceComputationOutputName,
106 const HdTupleTypeDataSourceHandle &valueType
107 );
108
116 {
117 public:
118 HD_API
119 Builder &SetInterpolation(
120 const HdTokenDataSourceHandle &interpolation);
121 HD_API
122 Builder &SetRole(
123 const HdTokenDataSourceHandle &role);
124 HD_API
125 Builder &SetSourceComputation(
126 const HdPathDataSourceHandle &sourceComputation);
127 HD_API
128 Builder &SetSourceComputationOutputName(
129 const HdTokenDataSourceHandle &sourceComputationOutputName);
130 HD_API
131 Builder &SetValueType(
132 const HdTupleTypeDataSourceHandle &valueType);
133
135 HD_API
136 HdContainerDataSourceHandle Build();
137
138 private:
139 HdTokenDataSourceHandle _interpolation;
140 HdTokenDataSourceHandle _role;
141 HdPathDataSourceHandle _sourceComputation;
142 HdTokenDataSourceHandle _sourceComputationOutputName;
143 HdTupleTypeDataSourceHandle _valueType;
144 };
145
146};
147
148PXR_NAMESPACE_CLOSE_SCOPE
149
150#endif
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...
Definition: schema.h:43
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:108