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
49class HdExtComputationPrimvarSchema : public HdSchema
50{
51public:
54
55 HdExtComputationPrimvarSchema(HdContainerDataSourceHandle container)
56 : HdSchema(container) {}
57
59
60// --(BEGIN CUSTOM CODE: Schema Methods)--
61
62 // these return statically allocated instances for the common cases.
63 static HdTokenDataSourceHandle BuildInterpolationDataSource(
64 TfToken interpolation) {
65 return HdPrimvarSchema::BuildInterpolationDataSource(interpolation);
66 }
67
68 static HdTokenDataSourceHandle BuildRoleDataSource(TfToken role) {
69 return HdPrimvarSchema::BuildRoleDataSource(role);
70 }
71
72// --(END CUSTOM CODE: Schema Methods)--
73
76
77 HD_API
78 HdTokenDataSourceHandle GetInterpolation() const;
79
80 HD_API
81 HdTokenDataSourceHandle GetRole() const;
82
83 HD_API
84 HdPathDataSourceHandle GetSourceComputation() const;
85
86 HD_API
87 HdTokenDataSourceHandle GetSourceComputationOutputName() const;
88
89 HD_API
90 HdTupleTypeDataSourceHandle GetValueType() const;
91
93
96
104 HD_API
105 static HdContainerDataSourceHandle
106 BuildRetained(
107 const HdTokenDataSourceHandle &interpolation,
108 const HdTokenDataSourceHandle &role,
109 const HdPathDataSourceHandle &sourceComputation,
110 const HdTokenDataSourceHandle &sourceComputationOutputName,
111 const HdTupleTypeDataSourceHandle &valueType
112 );
113
121 {
122 public:
123 HD_API
124 Builder &SetInterpolation(
125 const HdTokenDataSourceHandle &interpolation);
126 HD_API
127 Builder &SetRole(
128 const HdTokenDataSourceHandle &role);
129 HD_API
130 Builder &SetSourceComputation(
131 const HdPathDataSourceHandle &sourceComputation);
132 HD_API
133 Builder &SetSourceComputationOutputName(
134 const HdTokenDataSourceHandle &sourceComputationOutputName);
135 HD_API
136 Builder &SetValueType(
137 const HdTupleTypeDataSourceHandle &valueType);
138
140 HD_API
141 HdContainerDataSourceHandle Build();
142
143 private:
144 HdTokenDataSourceHandle _interpolation;
145 HdTokenDataSourceHandle _role;
146 HdPathDataSourceHandle _sourceComputation;
147 HdTokenDataSourceHandle _sourceComputationOutputName;
148 HdTupleTypeDataSourceHandle _valueType;
149
150 };
151
153};
154
155PXR_NAMESPACE_CLOSE_SCOPE
156
157#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:81