HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pxrEnvDayLight.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 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 //
24 #ifndef USDRI_GENERATED_PXRENVDAYLIGHT_H
25 #define USDRI_GENERATED_PXRENVDAYLIGHT_H
26 
27 /// \file usdRi/pxrEnvDayLight.h
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdRi/api.h"
31 #include "pxr/usd/usdLux/light.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 #include "pxr/usd/usdRi/tokens.h"
35 
36 #include "pxr/base/vt/value.h"
37 
38 #include "pxr/base/gf/vec3d.h"
39 #include "pxr/base/gf/vec3f.h"
40 #include "pxr/base/gf/matrix4d.h"
41 
42 #include "pxr/base/tf/token.h"
43 #include "pxr/base/tf/type.h"
44 
46 
47 class SdfAssetPath;
48 
49 // -------------------------------------------------------------------------- //
50 // PXRENVDAYLIGHT //
51 // -------------------------------------------------------------------------- //
52 
53 /// \class UsdRiPxrEnvDayLight
54 ///
55 /// \deprecated This schema will be replaced in a future release.
56 ///
58 {
59 public:
60  /// Compile time constant representing what kind of schema this class is.
61  ///
62  /// \sa UsdSchemaKind
64 
65  /// Construct a UsdRiPxrEnvDayLight on UsdPrim \p prim .
66  /// Equivalent to UsdRiPxrEnvDayLight::Get(prim.GetStage(), prim.GetPath())
67  /// for a \em valid \p prim, but will not immediately throw an error for
68  /// an invalid \p prim
69  explicit UsdRiPxrEnvDayLight(const UsdPrim& prim=UsdPrim())
70  : UsdLuxLight(prim)
71  {
72  }
73 
74  /// Construct a UsdRiPxrEnvDayLight on the prim held by \p schemaObj .
75  /// Should be preferred over UsdRiPxrEnvDayLight(schemaObj.GetPrim()),
76  /// as it preserves SchemaBase state.
77  explicit UsdRiPxrEnvDayLight(const UsdSchemaBase& schemaObj)
78  : UsdLuxLight(schemaObj)
79  {
80  }
81 
82  /// Destructor.
83  USDRI_API
84  virtual ~UsdRiPxrEnvDayLight();
85 
86  /// Return a vector of names of all pre-declared attributes for this schema
87  /// class and all its ancestor classes. Does not include attributes that
88  /// may be authored by custom/extended methods of the schemas involved.
89  USDRI_API
90  static const TfTokenVector &
91  GetSchemaAttributeNames(bool includeInherited=true);
92 
93  /// Return a UsdRiPxrEnvDayLight holding the prim adhering to this
94  /// schema at \p path on \p stage. If no prim exists at \p path on
95  /// \p stage, or if the prim at that path does not adhere to this schema,
96  /// return an invalid schema object. This is shorthand for the following:
97  ///
98  /// \code
99  /// UsdRiPxrEnvDayLight(stage->GetPrimAtPath(path));
100  /// \endcode
101  ///
102  USDRI_API
103  static UsdRiPxrEnvDayLight
104  Get(const UsdStagePtr &stage, const SdfPath &path);
105 
106  /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
107  /// is defined (according to UsdPrim::IsDefined()) on this stage.
108  ///
109  /// If a prim adhering to this schema at \p path is already defined on this
110  /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
111  /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
112  /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
113  /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
114  /// current EditTarget for any nonexistent, or existing but not \a Defined
115  /// ancestors.
116  ///
117  /// The given \a path must be an absolute prim path that does not contain
118  /// any variant selections.
119  ///
120  /// If it is impossible to author any of the necessary PrimSpecs, (for
121  /// example, in case \a path cannot map to the current UsdEditTarget's
122  /// namespace) issue an error and return an invalid \a UsdPrim.
123  ///
124  /// Note that this method may return a defined prim whose typeName does not
125  /// specify this schema class, in case a stronger typeName opinion overrides
126  /// the opinion at the current EditTarget.
127  ///
128  USDRI_API
129  static UsdRiPxrEnvDayLight
130  Define(const UsdStagePtr &stage, const SdfPath &path);
131 
132 protected:
133  /// Returns the kind of schema this class belongs to.
134  ///
135  /// \sa UsdSchemaKind
136  USDRI_API
137  UsdSchemaKind _GetSchemaKind() const override;
138 
139 private:
140  // needs to invoke _GetStaticTfType.
141  friend class UsdSchemaRegistry;
142  USDRI_API
143  static const TfType &_GetStaticTfType();
144 
145  static bool _IsTypedSchema();
146 
147  // override SchemaBase virtuals.
148  USDRI_API
149  const TfType &_GetTfType() const override;
150 
151 public:
152  // --------------------------------------------------------------------- //
153  // DAY
154  // --------------------------------------------------------------------- //
155  /// day: Day of the month, 1 through 31.
156  /// This is ignored if month is 0.
157  ///
158  /// | ||
159  /// | -- | -- |
160  /// | Declaration | `int day = 1` |
161  /// | C++ Type | int |
162  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
163  USDRI_API
164  UsdAttribute GetDayAttr() const;
165 
166  /// See GetDayAttr(), and also
167  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
168  /// If specified, author \p defaultValue as the attribute's default,
169  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
170  /// the default for \p writeSparsely is \c false.
171  USDRI_API
172  UsdAttribute CreateDayAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
173 
174 public:
175  // --------------------------------------------------------------------- //
176  // HAZINESS
177  // --------------------------------------------------------------------- //
178  /// haziness: The turbidity of the sky. The lower limit of the
179  /// model is 1.7 for an exceptionally clear sky, and 10, for an
180  /// nversion, is the upper limit.
181  ///
182  /// | ||
183  /// | -- | -- |
184  /// | Declaration | `float haziness = 2` |
185  /// | C++ Type | float |
186  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
187  USDRI_API
189 
190  /// See GetHazinessAttr(), and also
191  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
192  /// If specified, author \p defaultValue as the attribute's default,
193  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
194  /// the default for \p writeSparsely is \c false.
195  USDRI_API
196  UsdAttribute CreateHazinessAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
197 
198 public:
199  // --------------------------------------------------------------------- //
200  // HOUR
201  // --------------------------------------------------------------------- //
202  /// hour: Hours since midnight, local standard time. May be
203  /// fractional to include minutes and seconds. If daylight saving time
204  /// is in effect, subtract 1 to correct to standard time. This is
205  /// ignored if month is 0.
206  ///
207  /// | ||
208  /// | -- | -- |
209  /// | Declaration | `float hour = 14.633333` |
210  /// | C++ Type | float |
211  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
212  USDRI_API
213  UsdAttribute GetHourAttr() const;
214 
215  /// See GetHourAttr(), and also
216  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
217  /// If specified, author \p defaultValue as the attribute's default,
218  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
219  /// the default for \p writeSparsely is \c false.
220  USDRI_API
221  UsdAttribute CreateHourAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
222 
223 public:
224  // --------------------------------------------------------------------- //
225  // LATITUDE
226  // --------------------------------------------------------------------- //
227  /// latitude: Latitude in degrees. Positive for north, negative
228  /// for south. Ranges frmo -90 to +90 degrees. This is ignored if
229  /// month is 0.
230  ///
231  /// | ||
232  /// | -- | -- |
233  /// | Declaration | `float latitude = 47.602` |
234  /// | C++ Type | float |
235  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
236  USDRI_API
238 
239  /// See GetLatitudeAttr(), and also
240  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
241  /// If specified, author \p defaultValue as the attribute's default,
242  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
243  /// the default for \p writeSparsely is \c false.
244  USDRI_API
245  UsdAttribute CreateLatitudeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
246 
247 public:
248  // --------------------------------------------------------------------- //
249  // LONGITUDE
250  // --------------------------------------------------------------------- //
251  /// longitude: Longitude in degrees. Positive for east, negative
252  /// for west. Ranges frmo -180 to +180 degrees. This is ignored
253  /// if month is 0.
254  ///
255  /// | ||
256  /// | -- | -- |
257  /// | Declaration | `float longitude = -122.332` |
258  /// | C++ Type | float |
259  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
260  USDRI_API
262 
263  /// See GetLongitudeAttr(), and also
264  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
265  /// If specified, author \p defaultValue as the attribute's default,
266  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
267  /// the default for \p writeSparsely is \c false.
268  USDRI_API
269  UsdAttribute CreateLongitudeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
270 
271 public:
272  // --------------------------------------------------------------------- //
273  // MONTH
274  // --------------------------------------------------------------------- //
275  /// month: Month of the year, 1 through 12. The default,
276  /// 0, means to use the explicitly given sun direction instead of
277  /// automatically computing it.
278  ///
279  /// | ||
280  /// | -- | -- |
281  /// | Declaration | `int month = 0` |
282  /// | C++ Type | int |
283  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
284  USDRI_API
285  UsdAttribute GetMonthAttr() const;
286 
287  /// See GetMonthAttr(), and also
288  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
289  /// If specified, author \p defaultValue as the attribute's default,
290  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
291  /// the default for \p writeSparsely is \c false.
292  USDRI_API
293  UsdAttribute CreateMonthAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
294 
295 public:
296  // --------------------------------------------------------------------- //
297  // SKYTINT
298  // --------------------------------------------------------------------- //
299  /// skyTint: Tweak the sky's contribution and color. The
300  /// default, white (1,1,1), gives results based on measured
301  /// physical values.
302  ///
303  /// | ||
304  /// | -- | -- |
305  /// | Declaration | `color3f skyTint = (1, 1, 1)` |
306  /// | C++ Type | GfVec3f |
307  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Color3f |
308  USDRI_API
310 
311  /// See GetSkyTintAttr(), and also
312  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
313  /// If specified, author \p defaultValue as the attribute's default,
314  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
315  /// the default for \p writeSparsely is \c false.
316  USDRI_API
317  UsdAttribute CreateSkyTintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
318 
319 public:
320  // --------------------------------------------------------------------- //
321  // SUNDIRECTION
322  // --------------------------------------------------------------------- //
323  /// sunDirection: The *apparent* direction towards the center
324  /// of the sun. The zenith is at +Y (for noon light) and the horizon
325  /// is in the XZ plane (for sunrise/set). Note that the Y component
326  /// must non- negative. Ignored if a month is given.
327  ///
328  /// | ||
329  /// | -- | -- |
330  /// | Declaration | `vector3f sunDirection = (0, 0, 1)` |
331  /// | C++ Type | GfVec3f |
332  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Vector3f |
333  USDRI_API
335 
336  /// See GetSunDirectionAttr(), and also
337  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
338  /// If specified, author \p defaultValue as the attribute's default,
339  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
340  /// the default for \p writeSparsely is \c false.
341  USDRI_API
342  UsdAttribute CreateSunDirectionAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
343 
344 public:
345  // --------------------------------------------------------------------- //
346  // SUNSIZE
347  // --------------------------------------------------------------------- //
348  /// sunSize: Scale the apparent size of the sun in the sky.
349  /// Leave at 1 for a realistic sun size with an 0.55 degree
350  /// angular diameter.
351  ///
352  /// | ||
353  /// | -- | -- |
354  /// | Declaration | `float sunSize = 1` |
355  /// | C++ Type | float |
356  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
357  USDRI_API
359 
360  /// See GetSunSizeAttr(), and also
361  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
362  /// If specified, author \p defaultValue as the attribute's default,
363  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
364  /// the default for \p writeSparsely is \c false.
365  USDRI_API
366  UsdAttribute CreateSunSizeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
367 
368 public:
369  // --------------------------------------------------------------------- //
370  // SUNTINT
371  // --------------------------------------------------------------------- //
372  /// sunTint: Tweak the sun's contribution and color. The
373  /// default, white (1,1,1), gives results based on measured
374  /// physical values. Setting this to black removes the sun
375  /// contribution.
376  ///
377  /// | ||
378  /// | -- | -- |
379  /// | Declaration | `color3f sunTint = (1, 1, 1)` |
380  /// | C++ Type | GfVec3f |
381  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Color3f |
382  USDRI_API
384 
385  /// See GetSunTintAttr(), and also
386  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
387  /// If specified, author \p defaultValue as the attribute's default,
388  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
389  /// the default for \p writeSparsely is \c false.
390  USDRI_API
391  UsdAttribute CreateSunTintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
392 
393 public:
394  // --------------------------------------------------------------------- //
395  // YEAR
396  // --------------------------------------------------------------------- //
397  /// year: Four-digit year. This is ignored if month is 0.
398  ///
399  /// | ||
400  /// | -- | -- |
401  /// | Declaration | `int year = 2015` |
402  /// | C++ Type | int |
403  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
404  USDRI_API
405  UsdAttribute GetYearAttr() const;
406 
407  /// See GetYearAttr(), and also
408  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
409  /// If specified, author \p defaultValue as the attribute's default,
410  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
411  /// the default for \p writeSparsely is \c false.
412  USDRI_API
413  UsdAttribute CreateYearAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
414 
415 public:
416  // --------------------------------------------------------------------- //
417  // ZONE
418  // --------------------------------------------------------------------- //
419  /// zone: Standard time zone offset from GMT/UTC in hours.
420  /// Positive for east, negative for west. For example, this would
421  /// be -8 for Pacific time. This is ignored if month is 0.
422  ///
423  /// | ||
424  /// | -- | -- |
425  /// | Declaration | `float zone = -8` |
426  /// | C++ Type | float |
427  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
428  USDRI_API
429  UsdAttribute GetZoneAttr() const;
430 
431  /// See GetZoneAttr(), and also
432  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
433  /// If specified, author \p defaultValue as the attribute's default,
434  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
435  /// the default for \p writeSparsely is \c false.
436  USDRI_API
437  UsdAttribute CreateZoneAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
438 
439 public:
440  // ===================================================================== //
441  // Feel free to add custom code below this line, it will be preserved by
442  // the code generator.
443  //
444  // Just remember to:
445  // - Close the class declaration with };
446  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
447  // - Close the include guard with #endif
448  // ===================================================================== //
449  // --(BEGIN CUSTOM CODE)--
450 };
451 
453 
454 #endif
USDRI_API UsdAttribute CreateSunSizeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDRI_API UsdAttribute CreateSunTintAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
virtual USDRI_API ~UsdRiPxrEnvDayLight()
Destructor.
USDRI_API UsdAttribute GetSunDirectionAttr() const
USDRI_API UsdAttribute GetSkyTintAttr() const
USDRI_API UsdAttribute CreateLongitudeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
UsdRiPxrEnvDayLight(const UsdPrim &prim=UsdPrim())
USDRI_API UsdAttribute GetLatitudeAttr() const
USDRI_API UsdAttribute CreateZoneAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
static USDRI_API UsdRiPxrEnvDayLight Define(const UsdStagePtr &stage, const SdfPath &path)
UsdSchemaKind
Definition: common.h:127
USDRI_API UsdSchemaKind _GetSchemaKind() const override
USDRI_API UsdAttribute CreateMonthAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDRI_API UsdAttribute GetMonthAttr() const
USDRI_API UsdAttribute GetSunSizeAttr() const
static USDRI_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Represents a concrete typed schema.
Definition: prim.h:132
USDRI_API UsdAttribute GetYearAttr() const
USDRI_API UsdAttribute GetHourAttr() const
static USDRI_API UsdRiPxrEnvDayLight Get(const UsdStagePtr &stage, const SdfPath &path)
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
USDRI_API UsdAttribute CreateHourAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
#define USDRI_API
Definition: api.h:40
Definition: path.h:288
USDRI_API UsdAttribute CreateLatitudeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDRI_API UsdAttribute GetLongitudeAttr() const
USDRI_API UsdAttribute GetSunTintAttr() const
static const UsdSchemaKind schemaKind
UsdRiPxrEnvDayLight(const UsdSchemaBase &schemaObj)
USDRI_API UsdAttribute CreateYearAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDRI_API UsdAttribute CreateSunDirectionAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
USDRI_API UsdAttribute CreateDayAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
Definition: type.h:64
USDRI_API UsdAttribute GetHazinessAttr() const
USDRI_API UsdAttribute CreateHazinessAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDRI_API UsdAttribute GetZoneAttr() const
USDRI_API UsdAttribute GetDayAttr() const
Definition: value.h:168
USDRI_API UsdAttribute CreateSkyTintAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const