Loading...
Searching...
No Matches
lensDistortionSchema.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_LENS_DISTORTION_SCHEMA_H
19#define PXR_IMAGING_HD_LENS_DISTORTION_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28// --(END CUSTOM CODE: Includes)--
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define HD_LENS_DISTORTION_SCHEMA_TOKENS \
36 (lensDistortion) \
37 (type) \
38 (k1) \
39 (k2) \
40 (center) \
41 (anaSq) \
42 (asym) \
43 (scale) \
44 (ior) \
45 (standard) \
46 (fisheye) \
47
48TF_DECLARE_PUBLIC_TOKENS(HdLensDistortionSchemaTokens, HD_API,
49 HD_LENS_DISTORTION_SCHEMA_TOKENS);
50
51//-----------------------------------------------------------------------------
52
53
56class HdLensDistortionSchema : public HdSchema
57{
58public:
61
62 HdLensDistortionSchema(HdContainerDataSourceHandle container)
63 : HdSchema(container) {}
64
70 HD_API
71 static HdLensDistortionSchema GetFromParent(
72 const HdContainerDataSourceHandle &fromParentContainer);
73
75
76// --(BEGIN CUSTOM CODE: Schema Methods)--
77// --(END CUSTOM CODE: Schema Methods)--
78
81
82 HD_API
83 HdTokenDataSourceHandle GetType() const;
84
85 HD_API
86 HdFloatDataSourceHandle GetK1() const;
87
88 HD_API
89 HdFloatDataSourceHandle GetK2() const;
90
91 HD_API
92 HdVec2fDataSourceHandle GetCenter() const;
93
94 HD_API
95 HdFloatDataSourceHandle GetAnaSq() const;
96
97 HD_API
98 HdVec2fDataSourceHandle GetAsym() const;
99
100 HD_API
101 HdFloatDataSourceHandle GetScale() const;
102
103 HD_API
104 HdFloatDataSourceHandle GetIor() const;
105
107
110
113 HD_API
114 static const TfToken &GetSchemaToken();
115
118 HD_API
119 static const HdDataSourceLocator &GetDefaultLocator();
120
122
125
133 HD_API
134 static HdContainerDataSourceHandle
135 BuildRetained(
136 const HdTokenDataSourceHandle &type,
137 const HdFloatDataSourceHandle &k1,
138 const HdFloatDataSourceHandle &k2,
139 const HdVec2fDataSourceHandle &center,
140 const HdFloatDataSourceHandle &anaSq,
141 const HdVec2fDataSourceHandle &asym,
142 const HdFloatDataSourceHandle &scale,
143 const HdFloatDataSourceHandle &ior
144 );
145
153 {
154 public:
155 HD_API
156 Builder &SetType(
157 const HdTokenDataSourceHandle &type);
158 HD_API
159 Builder &SetK1(
160 const HdFloatDataSourceHandle &k1);
161 HD_API
162 Builder &SetK2(
163 const HdFloatDataSourceHandle &k2);
164 HD_API
165 Builder &SetCenter(
166 const HdVec2fDataSourceHandle &center);
167 HD_API
168 Builder &SetAnaSq(
169 const HdFloatDataSourceHandle &anaSq);
170 HD_API
171 Builder &SetAsym(
172 const HdVec2fDataSourceHandle &asym);
173 HD_API
174 Builder &SetScale(
175 const HdFloatDataSourceHandle &scale);
176 HD_API
177 Builder &SetIor(
178 const HdFloatDataSourceHandle &ior);
179
181 HD_API
182 HdContainerDataSourceHandle Build();
183
184 private:
185 HdTokenDataSourceHandle _type;
186 HdFloatDataSourceHandle _k1;
187 HdFloatDataSourceHandle _k2;
188 HdVec2fDataSourceHandle _center;
189 HdFloatDataSourceHandle _anaSq;
190 HdVec2fDataSourceHandle _asym;
191 HdFloatDataSourceHandle _scale;
192 HdFloatDataSourceHandle _ior;
193
194 };
195
202 HD_API
203 static HdTokenDataSourceHandle BuildTypeDataSource(
204 const TfToken &type);
205
207};
208
209PXR_NAMESPACE_CLOSE_SCOPE
210
211#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: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