Loading...
Searching...
No Matches
extComputationPrimvarSchema.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 PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
19#define PXR_IMAGING_HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34// --(END CUSTOM CODE: Declares)--
35
36#define HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS \
37 (interpolation) \
38 (role) \
39 (sourceComputation) \
40 (sourceComputationOutputName) \
41 (valueType) \
42
43TF_DECLARE_PUBLIC_TOKENS(HdExtComputationPrimvarSchemaTokens, HD_API,
44 HD_EXT_COMPUTATION_PRIMVAR_SCHEMA_TOKENS);
45
46//-----------------------------------------------------------------------------
47
48
51class HdExtComputationPrimvarSchema : public HdSchema
52{
53public:
56
57 HdExtComputationPrimvarSchema(HdContainerDataSourceHandle container)
58 : HdSchema(container) {}
59
61
62// --(BEGIN CUSTOM CODE: Schema Methods)--
63
64 // these return statically allocated instances for the common cases.
65 static HdTokenDataSourceHandle BuildInterpolationDataSource(
66 TfToken interpolation) {
67 return HdPrimvarSchema::BuildInterpolationDataSource(interpolation);
68 }
69
70 static HdTokenDataSourceHandle BuildRoleDataSource(TfToken role) {
71 return HdPrimvarSchema::BuildRoleDataSource(role);
72 }
73
74// --(END CUSTOM CODE: Schema Methods)--
75
78
79 HD_API
80 HdTokenDataSourceHandle GetInterpolation() const;
81
82 HD_API
83 HdTokenDataSourceHandle GetRole() const;
84
85 HD_API
86 HdPathDataSourceHandle GetSourceComputation() const;
87
88 HD_API
89 HdTokenDataSourceHandle GetSourceComputationOutputName() const;
90
91 HD_API
92 HdTupleTypeDataSourceHandle GetValueType() const;
93
95
98
106 HD_API
107 static HdContainerDataSourceHandle
108 BuildRetained(
109 const HdTokenDataSourceHandle &interpolation,
110 const HdTokenDataSourceHandle &role,
111 const HdPathDataSourceHandle &sourceComputation,
112 const HdTokenDataSourceHandle &sourceComputationOutputName,
113 const HdTupleTypeDataSourceHandle &valueType
114 );
115
123 {
124 public:
125 HD_API
126 Builder &SetInterpolation(
127 const HdTokenDataSourceHandle &interpolation);
128 HD_API
129 Builder &SetRole(
130 const HdTokenDataSourceHandle &role);
131 HD_API
132 Builder &SetSourceComputation(
133 const HdPathDataSourceHandle &sourceComputation);
134 HD_API
135 Builder &SetSourceComputationOutputName(
136 const HdTokenDataSourceHandle &sourceComputationOutputName);
137 HD_API
138 Builder &SetValueType(
139 const HdTupleTypeDataSourceHandle &valueType);
140
142 HD_API
143 HdContainerDataSourceHandle Build();
144
145 private:
146 HdTokenDataSourceHandle _interpolation;
147 HdTokenDataSourceHandle _role;
148 HdPathDataSourceHandle _sourceComputation;
149 HdTokenDataSourceHandle _sourceComputationOutputName;
150 HdTupleTypeDataSourceHandle _valueType;
151
152 };
153
155};
156
157PXR_NAMESPACE_CLOSE_SCOPE
158
159#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:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92