HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shapingAPI.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef USDLUX_GENERATED_SHAPINGAPI_H
8 #define USDLUX_GENERATED_SHAPINGAPI_H
9 
10 /// \file usdLux/shapingAPI.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usdLux/api.h"
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/stage.h"
17 #include "pxr/usd/usdLux/tokens.h"
18 
19 #include "pxr/usd/usdShade/input.h"
20 #include "pxr/usd/usdShade/output.h"
21 
22 #include "pxr/base/vt/value.h"
23 
24 #include "pxr/base/gf/vec3d.h"
25 #include "pxr/base/gf/vec3f.h"
26 #include "pxr/base/gf/matrix4d.h"
27 
28 #include "pxr/base/tf/token.h"
29 #include "pxr/base/tf/type.h"
30 
32 
33 class SdfAssetPath;
34 
35 // -------------------------------------------------------------------------- //
36 // SHAPINGAPI //
37 // -------------------------------------------------------------------------- //
38 
39 /// \class UsdLuxShapingAPI
40 ///
41 /// Controls for shaping a light's emission.
42 ///
44 {
45 public:
46  /// Compile time constant representing what kind of schema this class is.
47  ///
48  /// \sa UsdSchemaKind
50 
51  /// Construct a UsdLuxShapingAPI on UsdPrim \p prim .
52  /// Equivalent to UsdLuxShapingAPI::Get(prim.GetStage(), prim.GetPath())
53  /// for a \em valid \p prim, but will not immediately throw an error for
54  /// an invalid \p prim
55  explicit UsdLuxShapingAPI(const UsdPrim& prim=UsdPrim())
56  : UsdAPISchemaBase(prim)
57  {
58  }
59 
60  /// Construct a UsdLuxShapingAPI on the prim held by \p schemaObj .
61  /// Should be preferred over UsdLuxShapingAPI(schemaObj.GetPrim()),
62  /// as it preserves SchemaBase state.
63  explicit UsdLuxShapingAPI(const UsdSchemaBase& schemaObj)
64  : UsdAPISchemaBase(schemaObj)
65  {
66  }
67 
68  /// Destructor.
70  virtual ~UsdLuxShapingAPI();
71 
72  /// Return a vector of names of all pre-declared attributes for this schema
73  /// class and all its ancestor classes. Does not include attributes that
74  /// may be authored by custom/extended methods of the schemas involved.
76  static const TfTokenVector &
77  GetSchemaAttributeNames(bool includeInherited=true);
78 
79  /// Return a UsdLuxShapingAPI holding the prim adhering to this
80  /// schema at \p path on \p stage. If no prim exists at \p path on
81  /// \p stage, or if the prim at that path does not adhere to this schema,
82  /// return an invalid schema object. This is shorthand for the following:
83  ///
84  /// \code
85  /// UsdLuxShapingAPI(stage->GetPrimAtPath(path));
86  /// \endcode
87  ///
89  static UsdLuxShapingAPI
90  Get(const UsdStagePtr &stage, const SdfPath &path);
91 
92 
93  /// Returns true if this <b>single-apply</b> API schema can be applied to
94  /// the given \p prim. If this schema can not be a applied to the prim,
95  /// this returns false and, if provided, populates \p whyNot with the
96  /// reason it can not be applied.
97  ///
98  /// Note that if CanApply returns false, that does not necessarily imply
99  /// that calling Apply will fail. Callers are expected to call CanApply
100  /// before calling Apply if they want to ensure that it is valid to
101  /// apply a schema.
102  ///
103  /// \sa UsdPrim::GetAppliedSchemas()
104  /// \sa UsdPrim::HasAPI()
105  /// \sa UsdPrim::CanApplyAPI()
106  /// \sa UsdPrim::ApplyAPI()
107  /// \sa UsdPrim::RemoveAPI()
108  ///
109  USDLUX_API
110  static bool
111  CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
112 
113  /// Applies this <b>single-apply</b> API schema to the given \p prim.
114  /// This information is stored by adding "ShapingAPI" to the
115  /// token-valued, listOp metadata \em apiSchemas on the prim.
116  ///
117  /// \return A valid UsdLuxShapingAPI object is returned upon success.
118  /// An invalid (or empty) UsdLuxShapingAPI object is returned upon
119  /// failure. See \ref UsdPrim::ApplyAPI() for conditions
120  /// resulting in failure.
121  ///
122  /// \sa UsdPrim::GetAppliedSchemas()
123  /// \sa UsdPrim::HasAPI()
124  /// \sa UsdPrim::CanApplyAPI()
125  /// \sa UsdPrim::ApplyAPI()
126  /// \sa UsdPrim::RemoveAPI()
127  ///
128  USDLUX_API
129  static UsdLuxShapingAPI
130  Apply(const UsdPrim &prim);
131 
132 protected:
133  /// Returns the kind of schema this class belongs to.
134  ///
135  /// \sa UsdSchemaKind
136  USDLUX_API
137  UsdSchemaKind _GetSchemaKind() const override;
138 
139 private:
140  // needs to invoke _GetStaticTfType.
141  friend class UsdSchemaRegistry;
142  USDLUX_API
143  static const TfType &_GetStaticTfType();
144 
145  static bool _IsTypedSchema();
146 
147  // override SchemaBase virtuals.
148  USDLUX_API
149  const TfType &_GetTfType() const override;
150 
151 public:
152  // --------------------------------------------------------------------- //
153  // SHAPING:FOCUS
154  // --------------------------------------------------------------------- //
155  /// A control to shape the spread of light. Higher focus
156  /// values pull light towards the center and narrow the spread.
157  ///
158  /// This is implemented as a multiplication with the absolute value of the
159  /// dot product between the light's primary axis and the emission
160  /// direction, raised to the power `focus`. See `inputs:shaping:focusTint`
161  /// for the complete formula, but if we assume a default `focusTint` of
162  /// pure black, then that formula simplifies to:
163  ///
164  /// <center><b>
165  /// focusFactor = |emissionDirection • lightAxis|<sup>focus</sup>
166  ///
167  /// L<sub>Color</sub> = focusFactor ⋅ L<sub>Color</sub>
168  /// </b></center>
169  ///
170  /// Values < 0 are ignored.
171  ///
172  /// Note that the absolute value in the formula above means that sphere and
173  /// cylinder lights will emit "behind" the light as well as in front. If it
174  /// is desired that the light emits forward only, this can be achieved by setting
175  /// the `inputs:shaping:coneAngle` to 90 degrees or less.
176  ///
177  ///
178  /// | ||
179  /// | -- | -- |
180  /// | Declaration | `float inputs:shaping:focus = 0` |
181  /// | C++ Type | float |
182  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
183  USDLUX_API
185 
186  /// See GetShapingFocusAttr(), and also
187  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
188  /// If specified, author \p defaultValue as the attribute's default,
189  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
190  /// the default for \p writeSparsely is \c false.
191  USDLUX_API
192  UsdAttribute CreateShapingFocusAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
193 
194 public:
195  // --------------------------------------------------------------------- //
196  // SHAPING:FOCUSTINT
197  // --------------------------------------------------------------------- //
198  /// Off-axis color tint. This tints the emission in the
199  /// falloff region. The default tint is black.
200  ///
201  /// This is implemented as a linear interpolation between `focusTint` and
202  /// white, by the factor computed from the focus attribute, in other words:
203  ///
204  /// <center><b>
205  /// focusFactor = |emissionDirection • lightAxis|<sup>focus</sup>
206  ///
207  /// focusColor = lerp(focusFactor, focusTint, [1, 1, 1])
208  ///
209  /// L<sub>Color</sub> =
210  /// componentwiseMultiply(focusColor, L<sub>Color</sub>)
211  /// </b></center>
212  ///
213  /// Note that this implies that a focusTint of pure white will disable
214  /// focus.
215  ///
216  /// Note that the absolute value in the formula above means that sphere and
217  /// cylinder lights will emit "behind" the light as well as in front. If it
218  /// is desired that the light emits forward only, this can be achieved by setting
219  /// the `inputs:shaping:coneAngle` to 90 degrees or less.
220  ///
221  ///
222  /// | ||
223  /// | -- | -- |
224  /// | Declaration | `color3f inputs:shaping:focusTint = (0, 0, 0)` |
225  /// | C++ Type | GfVec3f |
226  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Color3f |
227  USDLUX_API
229 
230  /// See GetShapingFocusTintAttr(), and also
231  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
232  /// If specified, author \p defaultValue as the attribute's default,
233  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
234  /// the default for \p writeSparsely is \c false.
235  USDLUX_API
236  UsdAttribute CreateShapingFocusTintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
237 
238 public:
239  // --------------------------------------------------------------------- //
240  // SHAPING:CONE:ANGLE
241  // --------------------------------------------------------------------- //
242  /// Angular limit off the primary axis to restrict the light
243  /// spread, in degrees.
244  ///
245  /// Light emissions at angles off the primary axis greater than this are
246  /// guaranteed to be zero, i.e.:
247  ///
248  ///
249  /// <center><b>
250  /// 𝛳<sub>offAxis</sub> = acos(lightAxis • emissionDir)
251  ///
252  /// 𝛳<sub>cutoff</sub> = toRadians(coneAngle)
253  ///
254  ///
255  /// 𝛳<sub>offAxis</sub> > 𝛳<sub>cutoff</sub>
256  /// ⟹ L<sub>Scalar</sub> = 0
257  ///
258  /// </b></center>
259  ///
260  /// For angles < coneAngle, see the documentation for `shaping:cone:softness`.
261  /// However, at the default of coneSoftness = 0, the luminance is
262  /// unaltered if emissionOffAxisAngle <= coneAngle, so the coneAngle
263  /// functions as a hard binary "off" toggle for all angles > coneAngle.
264  ///
265  ///
266  /// | ||
267  /// | -- | -- |
268  /// | Declaration | `float inputs:shaping:cone:angle = 90` |
269  /// | C++ Type | float |
270  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
271  USDLUX_API
273 
274  /// See GetShapingConeAngleAttr(), and also
275  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
276  /// If specified, author \p defaultValue as the attribute's default,
277  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
278  /// the default for \p writeSparsely is \c false.
279  USDLUX_API
280  UsdAttribute CreateShapingConeAngleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
281 
282 public:
283  // --------------------------------------------------------------------- //
284  // SHAPING:CONE:SOFTNESS
285  // --------------------------------------------------------------------- //
286  /// Controls the cutoff softness for cone angle.
287  ///
288  /// At the default of coneSoftness = 0, the luminance is unaltered if
289  /// emissionOffAxisAngle <= coneAngle, and 0 if
290  /// emissionOffAxisAngle > coneAngle, so in this situation the coneAngle
291  /// functions as a hard binary "off" toggle for all angles > coneAngle.
292  ///
293  /// For coneSoftness in the range (0, 1], it defines the proportion of the
294  /// non-cutoff angles over which the luminance is smoothly interpolated from
295  /// 0 to 1. Mathematically:
296  ///
297  /// <center><b>
298  /// 𝛳<sub>offAxis</sub> = acos(lightAxis • emissionDir)
299  ///
300  /// 𝛳<sub>cutoff</sub> = toRadians(coneAngle)
301  ///
302  /// 𝛳<sub>smoothStart</sub> = lerp(coneSoftness, 𝛳<sub>cutoff</sub>, 0)
303  ///
304  /// L<sub>Scalar</sub> = L<sub>Scalar</sub> ⋅
305  /// (1 - smoothStep(𝛳<sub>offAxis</sub>,
306  /// 𝛳<sub>smoothStart</sub>,
307  /// 𝛳<sub>cutoff</sub>)
308  /// </b></center>
309  ///
310  /// Values outside of the [0, 1] range are clamped to the range.
311  ///
312  ///
313  /// | ||
314  /// | -- | -- |
315  /// | Declaration | `float inputs:shaping:cone:softness = 0` |
316  /// | C++ Type | float |
317  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
318  USDLUX_API
320 
321  /// See GetShapingConeSoftnessAttr(), and also
322  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
323  /// If specified, author \p defaultValue as the attribute's default,
324  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
325  /// the default for \p writeSparsely is \c false.
326  USDLUX_API
327  UsdAttribute CreateShapingConeSoftnessAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
328 
329 public:
330  // --------------------------------------------------------------------- //
331  // SHAPING:IES:FILE
332  // --------------------------------------------------------------------- //
333  /// An IES (Illumination Engineering Society) light
334  /// profile describing the angular distribution of light.
335  ///
336  /// For full details on the .ies file format, see the full specification,
337  /// ANSI/IES LM-63-19:
338  ///
339  /// https://store.ies.org/product/lm-63-19-approved-method-ies-standard-file-format-for-the-electronic-transfer-of-photometric-data-and-related-information/
340  ///
341  /// The luminous intensity values in the IES profile are sampled using
342  /// the emission direction in the light's local space (after a possible
343  /// transformation by a non-zero shaping:ies:angleScale, see below). The
344  /// sampled value is then potentially normalized by the overall power of the
345  /// profile if shaping:ies:normalize is enabled, and then used as a scaling
346  /// factor on the returned luminance:
347  ///
348  ///
349  /// <center><b>
350  /// 𝛳<sub>light</sub>, 𝜙 =
351  /// toPolarCoordinates(emissionDirectionInLightSpace)
352  ///
353  /// 𝛳<sub>ies</sub> = applyAngleScale(𝛳<sub>light</sub>, angleScale)
354  ///
355  /// iesSample = sampleIES(iesFile, 𝛳<sub>ies</sub>, 𝜙)
356  ///
357  /// iesNormalize ⟹ iesSample = iesSample ⋅ iesProfilePower(iesFile)
358  ///
359  /// L<sub>Color</sub> = iesSample ⋅ L<sub>Color</sub>
360  /// </b></center>
361  ///
362  /// See `inputs:shaping:ies:angleScale` for a description of
363  /// `applyAngleScale`, and `inputs:shaping:ies:normalize` for how
364  /// `iesProfilePower` is calculated.
365  ///
366  ///
367  /// | ||
368  /// | -- | -- |
369  /// | Declaration | `asset inputs:shaping:ies:file` |
370  /// | C++ Type | SdfAssetPath |
371  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Asset |
372  USDLUX_API
374 
375  /// See GetShapingIesFileAttr(), and also
376  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
377  /// If specified, author \p defaultValue as the attribute's default,
378  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
379  /// the default for \p writeSparsely is \c false.
380  USDLUX_API
381  UsdAttribute CreateShapingIesFileAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
382 
383 public:
384  // --------------------------------------------------------------------- //
385  // SHAPING:IES:ANGLESCALE
386  // --------------------------------------------------------------------- //
387  /// Rescales the angular distribution of the IES profile.
388  ///
389  /// Applies a scaling factor to the latitudinal theta/vertical polar
390  /// coordinate before sampling the IES profile, to shift the samples more
391  /// toward the "top" or "bottom" of the profile. The scaling origin varies
392  /// depending on whether `angleScale` is positive or negative. If it is
393  /// positive, the scaling origin is theta = 0. If it is negative, the
394  /// scaling origin is theta = pi (180 degrees). Values where
395  /// |angleScale| < 1 will "shrink" the angular range in which the
396  /// iesProfile is applied, while values where |angleScale| > 1 will
397  /// "grow" the angular range to which the iesProfile is mapped.
398  ///
399  /// If <i>𝛳<sub>light</sub></i> is the latitudinal theta polar
400  /// coordinate of the emission direction in the light's local space, and
401  /// <em>𝛳<sub>ies</sub></em> is the value that will be used when
402  /// actually sampling the profile, then the exact formula is:
403  ///
404  /// * <i>if angleScale > 0:</i>
405  /// <center><b>
406  /// 𝛳<sub>ies</sub> = 𝛳<sub>light</sub> / angleScale
407  /// </b></center>
408  ///
409  /// * <i>if angleScale = 0:</i>
410  /// <center><b>
411  /// 𝛳<sub>ies</sub> = 𝛳<sub>light</sub>
412  /// </b></center>
413  ///
414  /// * <i>if angleScale < 0:</i>
415  /// <center><b>
416  /// 𝛳<sub>ies</sub> = (𝛳<sub>light</sub> - π) / -angleScale + π
417  /// </b></center>
418  ///
419  /// Usage guidelines for artists / lighting TDs:
420  ///
421  /// **If you have an IES profile for a spotlight aimed "down":**
422  ///
423  /// - You should use a positive angleScale (> 0).
424  /// - Values where 0 < angleScale < 1 will narrow the spotlight beam.
425  /// - Values where angleScale > 1 will broaden the spotlight beam.
426  ///
427  /// For example, if the original IES profile is a downward spotlight with
428  /// a total cone angle of 60°, then angleScale = .5 will narrow it to
429  /// have a cone angle of 30°, and an angleScale of 1.5 will broaden it
430  /// to have a cone angle of 90°.
431  ///
432  /// **If you have an IES profile for a spotlight aimed "up":**
433  ///
434  /// - You should use a negative angleScale (< 0).
435  /// - Values where -1 < angleScale < 0 will narrow the spotlight beam.
436  /// - Values where angleScale < -1 will broaden the spotlight beam.
437  ///
438  /// For example, if the original IES profile is an upward spotlight with
439  /// a total cone angle of 60°, then angleScale = -.5 will narrow it to
440  /// have a cone angle of 30°, and an angleScale of -1.5 will broaden
441  /// it to have a cone angle of 90°.
442  ///
443  /// **If you have an IES profile that's isn't clearly "aimed" in a single
444  /// direction, OR it's aimed in a direction other than straight up or
445  /// down:**
446  ///
447  /// - Applying angleScale will alter the vertical angle mapping for your
448  /// IES light, but it may be difficult to have a clear intuitive sense
449  /// of how varying the angleScale will affect the shape of your light
450  ///
451  /// If you violate the above rules (i.e., use a negative angleScale for a
452  /// spotlight aimed down), then angleScale will still alter the vertical-
453  /// angle mapping, but in more non-intuitive ways (i.e., broadening /
454  /// narrowing may seem inverted, and the IES profile may seem to "translate"
455  /// through the vertical angles, rather than uniformly scale).
456  ///
457  ///
458  /// | ||
459  /// | -- | -- |
460  /// | Declaration | `float inputs:shaping:ies:angleScale = 0` |
461  /// | C++ Type | float |
462  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
463  USDLUX_API
465 
466  /// See GetShapingIesAngleScaleAttr(), and also
467  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
468  /// If specified, author \p defaultValue as the attribute's default,
469  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
470  /// the default for \p writeSparsely is \c false.
471  USDLUX_API
472  UsdAttribute CreateShapingIesAngleScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
473 
474 public:
475  // --------------------------------------------------------------------- //
476  // SHAPING:IES:NORMALIZE
477  // --------------------------------------------------------------------- //
478  /// Normalizes the IES profile so that it affects the shaping
479  /// of the light while preserving the overall energy output.
480  ///
481  /// The sampled luminous intensity is scaled by the overall power of the
482  /// IES profile if this is on, where the total power is calculated by
483  /// integrating the luminous intensity over all solid angle patches
484  /// defined in the profile.
485  ///
486  ///
487  /// | ||
488  /// | -- | -- |
489  /// | Declaration | `bool inputs:shaping:ies:normalize = 0` |
490  /// | C++ Type | bool |
491  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
492  USDLUX_API
494 
495  /// See GetShapingIesNormalizeAttr(), and also
496  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
497  /// If specified, author \p defaultValue as the attribute's default,
498  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
499  /// the default for \p writeSparsely is \c false.
500  USDLUX_API
501  UsdAttribute CreateShapingIesNormalizeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
502 
503 public:
504  // ===================================================================== //
505  // Feel free to add custom code below this line, it will be preserved by
506  // the code generator.
507  //
508  // Just remember to:
509  // - Close the class declaration with };
510  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
511  // - Close the include guard with #endif
512  // ===================================================================== //
513  // --(BEGIN CUSTOM CODE)--
514 
515  // -------------------------------------------------------------------------
516  /// \name Conversion to and from UsdShadeConnectableAPI
517  ///
518  /// @{
519 
520  /// Constructor that takes a ConnectableAPI object.
521  /// Allow implicit conversion of UsdShadeConnectableAPI to
522  /// UsdLuxShapingAPI.
523  USDLUX_API
524  UsdLuxShapingAPI(const UsdShadeConnectableAPI &connectable);
525 
526  /// Contructs and returns a UsdShadeConnectableAPI object with this shaping
527  /// API prim. Note that a valid UsdLuxShapingAPI will only return a valid
528  /// UsdShadeConnectableAPI if the its prim's Typed schema type is actually
529  /// connectable.
530  USDLUX_API
532 
533  /// @}
534 
535  // -------------------------------------------------------------------------
536  /// \name Outputs API
537  ///
538  /// Outputs represent a typed attribute on a shaping API whose value is
539  /// computed externally.
540  ///
541  /// @{
542 
543  /// Create an output which can either have a value or can be connected.
544  /// The attribute representing the output is created in the "outputs:"
545  /// namespace. Outputs on a shaping API cannot be connected, as their
546  /// value is assumed to be computed externally.
547  ///
548  USDLUX_API
550  const SdfValueTypeName& typeName);
551 
552  /// Return the requested output if it exists.
553  ///
554  USDLUX_API
555  UsdShadeOutput GetOutput(const TfToken &name) const;
556 
557  /// Outputs are represented by attributes in the "outputs:" namespace.
558  /// If \p onlyAuthored is true (the default), then only return authored
559  /// attributes; otherwise, this also returns un-authored builtins.
560  ///
561  USDLUX_API
562  std::vector<UsdShadeOutput> GetOutputs(bool onlyAuthored=true) const;
563 
564  /// @}
565 
566  // -------------------------------------------------------------------------
567 
568  /// \name Inputs API
569  ///
570  /// Inputs are connectable attribute with a typed value.
571  ///
572  /// Shaping API parameters are encoded as inputs.
573  ///
574  /// @{
575 
576  /// Create an input which can either have a value or can be connected.
577  /// The attribute representing the input is created in the "inputs:"
578  /// namespace. Inputs on shaping API are connectable.
579  ///
580  USDLUX_API
582  const SdfValueTypeName& typeName);
583 
584  /// Return the requested input if it exists.
585  ///
586  USDLUX_API
587  UsdShadeInput GetInput(const TfToken &name) const;
588 
589  /// Inputs are represented by attributes in the "inputs:" namespace.
590  /// If \p onlyAuthored is true (the default), then only return authored
591  /// attributes; otherwise, this also returns un-authored builtins.
592  ///
593  USDLUX_API
594  std::vector<UsdShadeInput> GetInputs(bool onlyAuthored=true) const;
595 
596  /// @}
597 };
598 
600 
601 #endif
USDLUX_API UsdAttribute CreateShapingConeSoftnessAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDLUX_API UsdShadeOutput CreateOutput(const TfToken &name, const SdfValueTypeName &typeName)
static USDLUX_API UsdLuxShapingAPI Get(const UsdStagePtr &stage, const SdfPath &path)
USDLUX_API UsdAttribute GetShapingConeAngleAttr() const
Single Apply API schema.
USDLUX_API UsdAttribute CreateShapingIesNormalizeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDLUX_API UsdShadeConnectableAPI ConnectableAPI() const
USDLUX_API UsdAttribute CreateShapingFocusTintAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
UsdLuxShapingAPI(const UsdPrim &prim=UsdPrim())
Definition: shapingAPI.h:55
#define USDLUX_API
Definition: api.h:23
USDLUX_API UsdAttribute GetShapingIesNormalizeAttr() const
static const UsdSchemaKind schemaKind
Definition: shapingAPI.h:49
USDLUX_API UsdShadeInput CreateInput(const TfToken &name, const SdfValueTypeName &typeName)
USDLUX_API UsdAttribute CreateShapingIesFileAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDLUX_API UsdShadeOutput GetOutput(const TfToken &name) const
USDLUX_API UsdAttribute CreateShapingFocusAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
Definition: token.h:70
USDLUX_API UsdAttribute GetShapingConeSoftnessAttr() const
static USDLUX_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
static USDLUX_API UsdLuxShapingAPI Apply(const UsdPrim &prim)
USDLUX_API UsdShadeInput GetInput(const TfToken &name) const
USDLUX_API std::vector< UsdShadeOutput > GetOutputs(bool onlyAuthored=true) const
USDLUX_API UsdAttribute CreateShapingConeAngleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
virtual USDLUX_API ~UsdLuxShapingAPI()
Destructor.
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
GLuint const GLchar * name
Definition: glcorearb.h:786
Definition: path.h:280
USDLUX_API UsdAttribute GetShapingIesFileAttr() const
USDLUX_API std::vector< UsdShadeInput > GetInputs(bool onlyAuthored=true) const
USDLUX_API UsdAttribute GetShapingIesAngleScaleAttr() const
UsdSchemaKind
Definition: common.h:112
USDLUX_API UsdAttribute GetShapingFocusAttr() const
USDLUX_API UsdAttribute GetShapingFocusTintAttr() const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47
static USDLUX_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
USDLUX_API UsdSchemaKind _GetSchemaKind() const override
UsdLuxShapingAPI(const UsdSchemaBase &schemaObj)
Definition: shapingAPI.h:63
USDLUX_API UsdAttribute CreateShapingIesAngleScaleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
Definition: value.h:89