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 surface normal 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 • lightNormal|<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  ///
173  /// | ||
174  /// | -- | -- |
175  /// | Declaration | `float inputs:shaping:focus = 0` |
176  /// | C++ Type | float |
177  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
178  USDLUX_API
180 
181  /// See GetShapingFocusAttr(), and also
182  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
183  /// If specified, author \p defaultValue as the attribute's default,
184  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
185  /// the default for \p writeSparsely is \c false.
186  USDLUX_API
187  UsdAttribute CreateShapingFocusAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
188 
189 public:
190  // --------------------------------------------------------------------- //
191  // SHAPING:FOCUSTINT
192  // --------------------------------------------------------------------- //
193  /// Off-axis color tint. This tints the emission in the
194  /// falloff region. The default tint is black.
195  ///
196  /// This is implemented as a linear interpolation between `focusTint` and
197  /// white, by the factor computed from the focus attribute, in other words:
198  ///
199  /// <center><b>
200  /// focusFactor = |emissionDirection • lightNormal|<sup>focus</sup>
201  ///
202  /// focusColor = lerp(focusFactor, focusTint, [1, 1, 1])
203  ///
204  /// L<sub>Color</sub> =
205  /// componentwiseMultiply(focusColor, L<sub>Color</sub>)
206  /// </b></center>
207  ///
208  /// Note that this implies that a focusTint of pure white will disable
209  /// focus.
210  ///
211  ///
212  /// | ||
213  /// | -- | -- |
214  /// | Declaration | `color3f inputs:shaping:focusTint = (0, 0, 0)` |
215  /// | C++ Type | GfVec3f |
216  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Color3f |
217  USDLUX_API
219 
220  /// See GetShapingFocusTintAttr(), and also
221  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
222  /// If specified, author \p defaultValue as the attribute's default,
223  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
224  /// the default for \p writeSparsely is \c false.
225  USDLUX_API
226  UsdAttribute CreateShapingFocusTintAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
227 
228 public:
229  // --------------------------------------------------------------------- //
230  // SHAPING:CONE:ANGLE
231  // --------------------------------------------------------------------- //
232  /// Angular limit off the primary axis to restrict the light
233  /// spread, in degrees.
234  ///
235  /// Light emissions at angles off the primary axis greater than this are
236  /// guaranteed to be zero, i.e.:
237  ///
238  ///
239  /// <center><b>
240  /// 𝛳<sub>offAxis</sub> = acos(lightAxis • emissionDir)
241  ///
242  /// 𝛳<sub>cutoff</sub> = toRadians(coneAngle)
243  ///
244  ///
245  /// 𝛳<sub>offAxis</sub> > 𝛳<sub>cutoff</sub>
246  /// ⟹ L<sub>Scalar</sub> = 0
247  ///
248  /// </b></center>
249  ///
250  /// For angles < coneAngle, see the documentation for `shaping:cone:softness`.
251  /// However, at the default of coneSoftness = 0, the luminance is
252  /// unaltered if emissionOffAxisAngle <= coneAngle, so the coneAngle
253  /// functions as a hard binary "off" toggle for all angles > coneAngle.
254  ///
255  ///
256  /// | ||
257  /// | -- | -- |
258  /// | Declaration | `float inputs:shaping:cone:angle = 90` |
259  /// | C++ Type | float |
260  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
261  USDLUX_API
263 
264  /// See GetShapingConeAngleAttr(), and also
265  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
266  /// If specified, author \p defaultValue as the attribute's default,
267  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
268  /// the default for \p writeSparsely is \c false.
269  USDLUX_API
270  UsdAttribute CreateShapingConeAngleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
271 
272 public:
273  // --------------------------------------------------------------------- //
274  // SHAPING:CONE:SOFTNESS
275  // --------------------------------------------------------------------- //
276  /// Controls the cutoff softness for cone angle.
277  ///
278  /// At the default of coneSoftness = 0, the luminance is unaltered if
279  /// emissionOffAxisAngle <= coneAngle, and 0 if
280  /// emissionOffAxisAngle > coneAngle, so in this situation the coneAngle
281  /// functions as a hard binary "off" toggle for all angles > coneAngle.
282  ///
283  /// For coneSoftness in the range (0, 1], it defines the proportion of the
284  /// non-cutoff angles over which the luminance is smoothly interpolated from
285  /// 0 to 1. Mathematically:
286  ///
287  /// <center><b>
288  /// 𝛳<sub>offAxis</sub> = acos(lightAxis • emissionDir)
289  ///
290  /// 𝛳<sub>cutoff</sub> = toRadians(coneAngle)
291  ///
292  /// 𝛳<sub>smoothStart</sub> = lerp(coneSoftness, 𝛳<sub>cutoff</sub>, 0)
293  ///
294  /// L<sub>Scalar</sub> = L<sub>Scalar</sub> ⋅
295  /// (1 - smoothStep(𝛳<sub>offAxis</sub>,
296  /// 𝛳<sub>smoothStart</sub>,
297  /// 𝛳<sub>cutoff</sub>)
298  /// </b></center>
299  ///
300  /// Values outside of the [0, 1] range are clamped to the range.
301  ///
302  ///
303  /// | ||
304  /// | -- | -- |
305  /// | Declaration | `float inputs:shaping:cone:softness = 0` |
306  /// | C++ Type | float |
307  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
308  USDLUX_API
310 
311  /// See GetShapingConeSoftnessAttr(), 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  USDLUX_API
317  UsdAttribute CreateShapingConeSoftnessAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
318 
319 public:
320  // --------------------------------------------------------------------- //
321  // SHAPING:IES:FILE
322  // --------------------------------------------------------------------- //
323  /// An IES (Illumination Engineering Society) light
324  /// profile describing the angular distribution of light.
325  ///
326  /// For full details on the .ies file format, see the full specification,
327  /// ANSI/IES LM-63-19:
328  ///
329  /// https://store.ies.org/product/lm-63-19-approved-method-ies-standard-file-format-for-the-electronic-transfer-of-photometric-data-and-related-information/
330  ///
331  /// The luminous intensity values in the IES profile are sampled using
332  /// the emission direction in the light's local space (after a possible
333  /// transformation by a non-zero shaping:ies:angleScale, see below). The
334  /// sampled value is then potentially normalized by the overall power of the
335  /// profile if shaping:ies:normalize is enabled, and then used as a scaling
336  /// factor on the returned luminance:
337  ///
338  ///
339  /// <center><b>
340  /// 𝛳<sub>light</sub>, 𝜙 =
341  /// toPolarCoordinates(emissionDirectionInLightSpace)
342  ///
343  /// 𝛳<sub>ies</sub> = applyAngleScale(𝛳<sub>light</sub>, angleScale)
344  ///
345  /// iesSample = sampleIES(iesFile, 𝛳<sub>ies</sub>, 𝜙)
346  ///
347  /// iesNormalize ⟹ iesSample = iesSample ⋅ iesProfilePower(iesFile)
348  ///
349  /// L<sub>Color</sub> = iesSample ⋅ L<sub>Color</sub>
350  /// </b></center>
351  ///
352  /// See `inputs:shaping:ies:angleScale` for a description of
353  /// `applyAngleScale`, and `inputs:shaping:ies:normalize` for how
354  /// `iesProfilePower` is calculated.
355  ///
356  ///
357  /// | ||
358  /// | -- | -- |
359  /// | Declaration | `asset inputs:shaping:ies:file` |
360  /// | C++ Type | SdfAssetPath |
361  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Asset |
362  USDLUX_API
364 
365  /// See GetShapingIesFileAttr(), and also
366  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
367  /// If specified, author \p defaultValue as the attribute's default,
368  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
369  /// the default for \p writeSparsely is \c false.
370  USDLUX_API
371  UsdAttribute CreateShapingIesFileAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
372 
373 public:
374  // --------------------------------------------------------------------- //
375  // SHAPING:IES:ANGLESCALE
376  // --------------------------------------------------------------------- //
377  /// Rescales the angular distribution of the IES profile.
378  ///
379  /// Applies a scaling factor to the latitudinal theta/vertical polar
380  /// coordinate before sampling the IES profile, to shift the samples more
381  /// toward the "top" or "bottom" of the profile. The scaling origin varies
382  /// depending on whether `angleScale` is positive or negative. If it is
383  /// positive, the scaling origin is theta = 0. If it is negative, the
384  /// scaling origin is theta = pi (180 degrees). Values where
385  /// |angleScale| < 1 will "shrink" the angular range in which the
386  /// iesProfile is applied, while values where |angleScale| > 1 will
387  /// "grow" the angular range to which the iesProfile is mapped.
388  ///
389  /// If <i>𝛳<sub>light</sub></i> is the latitudinal theta polar
390  /// coordinate of the emission direction in the light's local space, and
391  /// <em>𝛳<sub>ies</sub></em> is the value that will be used when
392  /// actually sampling the profile, then the exact formula is:
393  ///
394  /// * <i>if angleScale > 0:</i>
395  /// <center><b>
396  /// 𝛳<sub>ies</sub> = 𝛳<sub>light</sub> / angleScale
397  /// </b></center>
398  ///
399  /// * <i>if angleScale = 0:</i>
400  /// <center><b>
401  /// 𝛳<sub>ies</sub> = 𝛳<sub>light</sub>
402  /// </b></center>
403  ///
404  /// * <i>if angleScale < 0:</i>
405  /// <center><b>
406  /// 𝛳<sub>ies</sub> = (𝛳<sub>light</sub> - π) / -angleScale
407  /// </b></center>
408  ///
409  /// Usage guidelines for artists / lighting TDs:
410  ///
411  /// **If you have an IES profile for a spotlight aimed "down":**
412  ///
413  /// - You should use a positive angleScale (> 0).
414  /// - Values where 0 < angleScale < 1 will narrow the spotlight beam.
415  /// - Values where angleScale > 1 will broaden the spotlight beam.
416  ///
417  /// For example, if the original IES profile is a downward spotlight with
418  /// a total cone angle of 60°, then angleScale = .5 will narrow it to
419  /// have a cone angle of 30°, and an angleScale of 1.5 will broaden it
420  /// to have a cone angle of 90°.
421  ///
422  /// **If you have an IES profile for a spotlight aimed "up":**
423  ///
424  /// - You should use a negative angleScale (< 0).
425  /// - Values where -1 < angleScale < 0 will narrow the spotlight beam.
426  /// - Values where angleScale < -1 will broaden the spotlight beam.
427  ///
428  /// For example, if the original IES profile is an upward spotlight with
429  /// a total cone angle of 60°, then angleScale = -.5 will narrow it to
430  /// have a cone angle of 30°, and an angleScale of -1.5 will broaden
431  /// it to have a cone angle of 90°.
432  ///
433  /// **If you have an IES profile that's isn't clearly "aimed" in a single
434  /// direction, OR it's aimed in a direction other than straight up or
435  /// down:**
436  ///
437  /// - Applying angleScale will alter the vertical angle mapping for your
438  /// IES light, but it may be difficult to have a clear intuitive sense
439  /// of how varying the angleScale will affect the shape of your light
440  ///
441  /// If you violate the above rules (i.e., use a negative angleScale for a
442  /// spotlight aimed down), then angleScale will still alter the vertical-
443  /// angle mapping, but in more non-intuitive ways (i.e., broadening /
444  /// narrowing may seem inverted, and the IES profile may seem to "translate"
445  /// through the vertical angles, rather than uniformly scale).
446  ///
447  ///
448  /// | ||
449  /// | -- | -- |
450  /// | Declaration | `float inputs:shaping:ies:angleScale = 0` |
451  /// | C++ Type | float |
452  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
453  USDLUX_API
455 
456  /// See GetShapingIesAngleScaleAttr(), and also
457  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
458  /// If specified, author \p defaultValue as the attribute's default,
459  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
460  /// the default for \p writeSparsely is \c false.
461  USDLUX_API
462  UsdAttribute CreateShapingIesAngleScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
463 
464 public:
465  // --------------------------------------------------------------------- //
466  // SHAPING:IES:NORMALIZE
467  // --------------------------------------------------------------------- //
468  /// Normalizes the IES profile so that it affects the shaping
469  /// of the light while preserving the overall energy output.
470  ///
471  /// The sampled luminous intensity is scaled by the overall power of the
472  /// IES profile if this is on, where the total power is calculated by
473  /// integrating the luminous intensity over all solid angle patches
474  /// defined in the profile.
475  ///
476  ///
477  /// | ||
478  /// | -- | -- |
479  /// | Declaration | `bool inputs:shaping:ies:normalize = 0` |
480  /// | C++ Type | bool |
481  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
482  USDLUX_API
484 
485  /// See GetShapingIesNormalizeAttr(), and also
486  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
487  /// If specified, author \p defaultValue as the attribute's default,
488  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
489  /// the default for \p writeSparsely is \c false.
490  USDLUX_API
491  UsdAttribute CreateShapingIesNormalizeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
492 
493 public:
494  // ===================================================================== //
495  // Feel free to add custom code below this line, it will be preserved by
496  // the code generator.
497  //
498  // Just remember to:
499  // - Close the class declaration with };
500  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
501  // - Close the include guard with #endif
502  // ===================================================================== //
503  // --(BEGIN CUSTOM CODE)--
504 
505  // -------------------------------------------------------------------------
506  /// \name Conversion to and from UsdShadeConnectableAPI
507  ///
508  /// @{
509 
510  /// Constructor that takes a ConnectableAPI object.
511  /// Allow implicit conversion of UsdShadeConnectableAPI to
512  /// UsdLuxShapingAPI.
513  USDLUX_API
514  UsdLuxShapingAPI(const UsdShadeConnectableAPI &connectable);
515 
516  /// Contructs and returns a UsdShadeConnectableAPI object with this shaping
517  /// API prim. Note that a valid UsdLuxShapingAPI will only return a valid
518  /// UsdShadeConnectableAPI if the its prim's Typed schema type is actually
519  /// connectable.
520  USDLUX_API
522 
523  /// @}
524 
525  // -------------------------------------------------------------------------
526  /// \name Outputs API
527  ///
528  /// Outputs represent a typed attribute on a shaping API whose value is
529  /// computed externally.
530  ///
531  /// @{
532 
533  /// Create an output which can either have a value or can be connected.
534  /// The attribute representing the output is created in the "outputs:"
535  /// namespace. Outputs on a shaping API cannot be connected, as their
536  /// value is assumed to be computed externally.
537  ///
538  USDLUX_API
540  const SdfValueTypeName& typeName);
541 
542  /// Return the requested output if it exists.
543  ///
544  USDLUX_API
545  UsdShadeOutput GetOutput(const TfToken &name) const;
546 
547  /// Outputs are represented by attributes in the "outputs:" namespace.
548  /// If \p onlyAuthored is true (the default), then only return authored
549  /// attributes; otherwise, this also returns un-authored builtins.
550  ///
551  USDLUX_API
552  std::vector<UsdShadeOutput> GetOutputs(bool onlyAuthored=true) const;
553 
554  /// @}
555 
556  // -------------------------------------------------------------------------
557 
558  /// \name Inputs API
559  ///
560  /// Inputs are connectable attribute with a typed value.
561  ///
562  /// Shaping API parameters are encoded as inputs.
563  ///
564  /// @{
565 
566  /// Create an input which can either have a value or can be connected.
567  /// The attribute representing the input is created in the "inputs:"
568  /// namespace. Inputs on shaping API are connectable.
569  ///
570  USDLUX_API
572  const SdfValueTypeName& typeName);
573 
574  /// Return the requested input if it exists.
575  ///
576  USDLUX_API
577  UsdShadeInput GetInput(const TfToken &name) const;
578 
579  /// Inputs are represented by attributes in the "inputs:" namespace.
580  /// If \p onlyAuthored is true (the default), then only return authored
581  /// attributes; otherwise, this also returns un-authored builtins.
582  ///
583  USDLUX_API
584  std::vector<UsdShadeInput> GetInputs(bool onlyAuthored=true) const;
585 
586  /// @}
587 };
588 
590 
591 #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
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:273
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
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
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:146