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
54class HdLensDistortionSchema : public HdSchema
55{
56public:
59
60 HdLensDistortionSchema(HdContainerDataSourceHandle container)
61 : HdSchema(container) {}
62
68 HD_API
69 static HdLensDistortionSchema GetFromParent(
70 const HdContainerDataSourceHandle &fromParentContainer);
71
73
74// --(BEGIN CUSTOM CODE: Schema Methods)--
75// --(END CUSTOM CODE: Schema Methods)--
76
79
80 HD_API
81 HdTokenDataSourceHandle GetType() const;
82
83 HD_API
84 HdFloatDataSourceHandle GetK1() const;
85
86 HD_API
87 HdFloatDataSourceHandle GetK2() const;
88
89 HD_API
90 HdVec2fDataSourceHandle GetCenter() const;
91
92 HD_API
93 HdFloatDataSourceHandle GetAnaSq() const;
94
95 HD_API
96 HdVec2fDataSourceHandle GetAsym() const;
97
98 HD_API
99 HdFloatDataSourceHandle GetScale() const;
100
101 HD_API
102 HdFloatDataSourceHandle GetIor() const;
103
105
108
111 HD_API
112 static const TfToken &GetSchemaToken();
113
116 HD_API
117 static const HdDataSourceLocator &GetDefaultLocator();
118
120
123
131 HD_API
132 static HdContainerDataSourceHandle
133 BuildRetained(
134 const HdTokenDataSourceHandle &type,
135 const HdFloatDataSourceHandle &k1,
136 const HdFloatDataSourceHandle &k2,
137 const HdVec2fDataSourceHandle &center,
138 const HdFloatDataSourceHandle &anaSq,
139 const HdVec2fDataSourceHandle &asym,
140 const HdFloatDataSourceHandle &scale,
141 const HdFloatDataSourceHandle &ior
142 );
143
151 {
152 public:
153 HD_API
154 Builder &SetType(
155 const HdTokenDataSourceHandle &type);
156 HD_API
157 Builder &SetK1(
158 const HdFloatDataSourceHandle &k1);
159 HD_API
160 Builder &SetK2(
161 const HdFloatDataSourceHandle &k2);
162 HD_API
163 Builder &SetCenter(
164 const HdVec2fDataSourceHandle &center);
165 HD_API
166 Builder &SetAnaSq(
167 const HdFloatDataSourceHandle &anaSq);
168 HD_API
169 Builder &SetAsym(
170 const HdVec2fDataSourceHandle &asym);
171 HD_API
172 Builder &SetScale(
173 const HdFloatDataSourceHandle &scale);
174 HD_API
175 Builder &SetIor(
176 const HdFloatDataSourceHandle &ior);
177
179 HD_API
180 HdContainerDataSourceHandle Build();
181
182 private:
183 HdTokenDataSourceHandle _type;
184 HdFloatDataSourceHandle _k1;
185 HdFloatDataSourceHandle _k2;
186 HdVec2fDataSourceHandle _center;
187 HdFloatDataSourceHandle _anaSq;
188 HdVec2fDataSourceHandle _asym;
189 HdFloatDataSourceHandle _scale;
190 HdFloatDataSourceHandle _ior;
191
192 };
193
200 HD_API
201 static HdTokenDataSourceHandle BuildTypeDataSource(
202 const TfToken &type);
203
205};
206
207PXR_NAMESPACE_CLOSE_SCOPE
208
209#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:81