Loading...
Searching...
No Matches
lensDistortionSchema.h
Go to the documentation of this file.
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 hdSchemaDefs.py instead to make changes. ** */
32/* ** ** */
33/* ************************************************************************** */
34
35#ifndef PXR_IMAGING_HD_LENS_DISTORTION_SCHEMA_H
36#define PXR_IMAGING_HD_LENS_DISTORTION_SCHEMA_H
37
39
40#include "pxr/imaging/hd/api.h"
41
42#include "pxr/imaging/hd/schema.h"
43
44// --(BEGIN CUSTOM CODE: Includes)--
45// --(END CUSTOM CODE: Includes)--
46
47PXR_NAMESPACE_OPEN_SCOPE
48
49// --(BEGIN CUSTOM CODE: Declares)--
50// --(END CUSTOM CODE: Declares)--
51
52#define HD_LENS_DISTORTION_SCHEMA_TOKENS \
53 (lensDistortion) \
54 (type) \
55 (k1) \
56 (k2) \
57 (center) \
58 (anaSq) \
59 (asym) \
60 (scale) \
61 (ior) \
62 (standard) \
63 (fisheye) \
64
65TF_DECLARE_PUBLIC_TOKENS(HdLensDistortionSchemaTokens, HD_API,
66 HD_LENS_DISTORTION_SCHEMA_TOKENS);
67
68//-----------------------------------------------------------------------------
69
70
71class HdLensDistortionSchema : public HdSchema
72{
73public:
76
77 HdLensDistortionSchema(HdContainerDataSourceHandle container)
78 : HdSchema(container) {}
79
85 HD_API
86 static HdLensDistortionSchema GetFromParent(
87 const HdContainerDataSourceHandle &fromParentContainer);
88
90
91// --(BEGIN CUSTOM CODE: Schema Methods)--
92// --(END CUSTOM CODE: Schema Methods)--
93
96
97 HD_API
98 HdTokenDataSourceHandle GetType() const;
99
100 HD_API
101 HdFloatDataSourceHandle GetK1() const;
102
103 HD_API
104 HdFloatDataSourceHandle GetK2() const;
105
106 HD_API
107 HdVec2fDataSourceHandle GetCenter() const;
108
109 HD_API
110 HdFloatDataSourceHandle GetAnaSq() const;
111
112 HD_API
113 HdVec2fDataSourceHandle GetAsym() const;
114
115 HD_API
116 HdFloatDataSourceHandle GetScale() const;
117
118 HD_API
119 HdFloatDataSourceHandle GetIor() const;
120
122
125
128 HD_API
129 static const TfToken &GetSchemaToken();
130
133 HD_API
134 static const HdDataSourceLocator &GetDefaultLocator();
135
137
140
148 HD_API
149 static HdContainerDataSourceHandle
150 BuildRetained(
151 const HdTokenDataSourceHandle &type,
152 const HdFloatDataSourceHandle &k1,
153 const HdFloatDataSourceHandle &k2,
154 const HdVec2fDataSourceHandle &center,
155 const HdFloatDataSourceHandle &anaSq,
156 const HdVec2fDataSourceHandle &asym,
157 const HdFloatDataSourceHandle &scale,
158 const HdFloatDataSourceHandle &ior
159 );
160
168 {
169 public:
170 HD_API
171 Builder &SetType(
172 const HdTokenDataSourceHandle &type);
173 HD_API
174 Builder &SetK1(
175 const HdFloatDataSourceHandle &k1);
176 HD_API
177 Builder &SetK2(
178 const HdFloatDataSourceHandle &k2);
179 HD_API
180 Builder &SetCenter(
181 const HdVec2fDataSourceHandle &center);
182 HD_API
183 Builder &SetAnaSq(
184 const HdFloatDataSourceHandle &anaSq);
185 HD_API
186 Builder &SetAsym(
187 const HdVec2fDataSourceHandle &asym);
188 HD_API
189 Builder &SetScale(
190 const HdFloatDataSourceHandle &scale);
191 HD_API
192 Builder &SetIor(
193 const HdFloatDataSourceHandle &ior);
194
196 HD_API
197 HdContainerDataSourceHandle Build();
198
199 private:
200 HdTokenDataSourceHandle _type;
201 HdFloatDataSourceHandle _k1;
202 HdFloatDataSourceHandle _k2;
203 HdVec2fDataSourceHandle _center;
204 HdFloatDataSourceHandle _anaSq;
205 HdVec2fDataSourceHandle _asym;
206 HdFloatDataSourceHandle _scale;
207 HdFloatDataSourceHandle _ior;
208
209 };
210
217 HD_API
218 static HdTokenDataSourceHandle BuildTypeDataSource(
219 const TfToken &type);
220
222};
223
224PXR_NAMESPACE_CLOSE_SCOPE
225
226#endif
Represents an object that can identify the location of a data source.
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:98