All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
light.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 USDLUX_GENERATED_LIGHT_H
25 #define USDLUX_GENERATED_LIGHT_H
26 
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdLux/api.h"
31 #include "pxr/usd/usdGeom/xformable.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 #include "pxr/usd/usdLux/tokens.h"
35 
36 #include "pxr/usd/usd/collectionAPI.h"
37 
38 #include "pxr/base/vt/value.h"
39 
40 #include "pxr/base/gf/vec3d.h"
41 #include "pxr/base/gf/vec3f.h"
42 #include "pxr/base/gf/matrix4d.h"
43 
44 #include "pxr/base/tf/token.h"
45 #include "pxr/base/tf/type.h"
46 
47 PXR_NAMESPACE_OPEN_SCOPE
48 
49 class SdfAssetPath;
50 
51 // -------------------------------------------------------------------------- //
52 // LIGHT //
53 // -------------------------------------------------------------------------- //
54 
78 {
79 public:
84 
89  explicit UsdLuxLight(const UsdPrim& prim=UsdPrim())
90  : UsdGeomXformable(prim)
91  {
92  }
93 
97  explicit UsdLuxLight(const UsdSchemaBase& schemaObj)
98  : UsdGeomXformable(schemaObj)
99  {
100  }
101 
103  USDLUX_API
104  virtual ~UsdLuxLight();
105 
109  USDLUX_API
110  static const TfTokenVector &
111  GetSchemaAttributeNames(bool includeInherited=true);
112 
122  USDLUX_API
123  static UsdLuxLight
124  Get(const UsdStagePtr &stage, const SdfPath &path);
125 
126 
127 protected:
131  USDLUX_API
132  UsdSchemaType _GetSchemaType() const override;
133 
134 private:
135  // needs to invoke _GetStaticTfType.
136  friend class UsdSchemaRegistry;
137  USDLUX_API
138  static const TfType &_GetStaticTfType();
139 
140  static bool _IsTypedSchema();
141 
142  // override SchemaBase virtuals.
143  USDLUX_API
144  const TfType &_GetTfType() const override;
145 
146 public:
147  // --------------------------------------------------------------------- //
148  // INTENSITY
149  // --------------------------------------------------------------------- //
156  USDLUX_API
158 
164  USDLUX_API
165  UsdAttribute CreateIntensityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
166 
167 public:
168  // --------------------------------------------------------------------- //
169  // EXPOSURE
170  // --------------------------------------------------------------------- //
179  USDLUX_API
181 
187  USDLUX_API
188  UsdAttribute CreateExposureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
189 
190 public:
191  // --------------------------------------------------------------------- //
192  // DIFFUSE
193  // --------------------------------------------------------------------- //
201  USDLUX_API
203 
209  USDLUX_API
210  UsdAttribute CreateDiffuseAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
211 
212 public:
213  // --------------------------------------------------------------------- //
214  // SPECULAR
215  // --------------------------------------------------------------------- //
223  USDLUX_API
225 
231  USDLUX_API
232  UsdAttribute CreateSpecularAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
233 
234 public:
235  // --------------------------------------------------------------------- //
236  // NORMALIZE
237  // --------------------------------------------------------------------- //
247  USDLUX_API
249 
255  USDLUX_API
256  UsdAttribute CreateNormalizeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
257 
258 public:
259  // --------------------------------------------------------------------- //
260  // COLOR
261  // --------------------------------------------------------------------- //
268  USDLUX_API
269  UsdAttribute GetColorAttr() const;
270 
276  USDLUX_API
277  UsdAttribute CreateColorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
278 
279 public:
280  // --------------------------------------------------------------------- //
281  // ENABLECOLORTEMPERATURE
282  // --------------------------------------------------------------------- //
289  USDLUX_API
291 
297  USDLUX_API
298  UsdAttribute CreateEnableColorTemperatureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
299 
300 public:
301  // --------------------------------------------------------------------- //
302  // COLORTEMPERATURE
303  // --------------------------------------------------------------------- //
316  USDLUX_API
318 
324  USDLUX_API
325  UsdAttribute CreateColorTemperatureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
326 
327 public:
328  // --------------------------------------------------------------------- //
329  // FILTERS
330  // --------------------------------------------------------------------- //
333  USDLUX_API
335 
338  USDLUX_API
340 
341 public:
342  // ===================================================================== //
343  // Feel free to add custom code below this line, it will be preserved by
344  // the code generator.
345  //
346  // Just remember to:
347  // - Close the class declaration with };
348  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
349  // - Close the include guard with #endif
350  // ===================================================================== //
351  // --(BEGIN CUSTOM CODE)--
352 
369  USDLUX_API
371 
375  USDLUX_API
377 
381  USDLUX_API
383 };
384 
385 PXR_NAMESPACE_CLOSE_SCOPE
386 
387 #endif
USDLUX_API UsdAttribute GetEnableColorTemperatureAttr() const
Enables using colorTemperature.
USDLUX_API UsdAttribute CreateExposureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExposureAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDLUX_API UsdAttribute CreateIntensityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIntensityAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDLUX_API UsdCollectionAPI GetLightLinkCollectionAPI() const
Return the UsdCollectionAPI interface used for examining and modifying the light-linking of this ligh...
USDLUX_API UsdAttribute CreateSpecularAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSpecularAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDLUX_API UsdRelationship CreateFiltersRel() const
See GetFiltersRel(), and also Create vs Get Property Methods for when to use Get vs Create...
static const UsdSchemaType schemaType
Compile time constant representing what kind of schema this class is.
Definition: light.h:83
Basic type for a vector of 3 float components.
Definition: vec3f.h:63
USDLUX_API UsdRelationship GetFiltersRel() const
Relationship to the light filters that apply to this light.
static USDLUX_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDLUX_API UsdAttribute GetIntensityAttr() const
Scales the power of the light linearly.
UsdLuxLight(const UsdSchemaBase &schemaObj)
Construct a UsdLuxLight on the prim held by schemaObj .
Definition: light.h:97
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
Definition: attribute.h:176
USDLUX_API UsdAttribute CreateDiffuseAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDiffuseAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDLUX_API UsdAttribute CreateColorTemperatureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetColorTemperatureAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
virtual USDLUX_API ~UsdLuxLight()
Destructor.
UsdLuxLight(const UsdPrim &prim=UsdPrim())
Construct a UsdLuxLight on UsdPrim prim .
Definition: light.h:89
USDLUX_API UsdAttribute GetColorTemperatureAttr() const
Color temperature, in degrees Kelvin, representing the white point.
USDLUX_API UsdAttribute GetDiffuseAttr() const
A multiplier for the effect of this light on the diffuse response of materials.
USDLUX_API UsdAttribute CreateColorAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetColorAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDLUX_API UsdAttribute GetExposureAttr() const
Scales the power of the light exponentially as a power of 2 (similar to an F-stop control over exposu...
USDLUX_API GfVec3f ComputeBaseEmission() const
Computes the base emission (aka radiant flux density, aka energy per unit area), incorporating the pa...
USDLUX_API UsdAttribute GetNormalizeAttr() const
Normalizes power by the surface area of the light.
USDLUX_API UsdSchemaType _GetSchemaType() const override
Returns the type of schema this class belongs to.
This is a general purpose API schema, used to describe a collection of heterogeneous objects within t...
UsdSchemaType
An enum representing which type of schema a given schema class belongs to.
Definition: common.h:149
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:131
USDLUX_API UsdAttribute CreateNormalizeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetNormalizeAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:438
USDLUX_API UsdAttribute GetColorAttr() const
The color of emitted light, in energy-linear terms.
Represents a non-concrete typed schema.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:287
USDLUX_API UsdCollectionAPI GetShadowLinkCollectionAPI() const
Return the UsdCollectionAPI interface used for examining and modifying the shadow-linking of this lig...
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:128
Contains an asset path and an optional resolved path.
Definition: assetPath.h:43
Base class for all lights.
Definition: light.h:77
TfType represents a dynamic runtime type.
Definition: type.h:70
Singleton registry that provides access to prim and property definition information for registered Us...
static USDLUX_API UsdLuxLight Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLuxLight holding the prim adhering to this schema at path on stage.
USDLUX_API UsdAttribute GetSpecularAttr() const
A multiplier for the effect of this light on the specular response of materials.
The base class for all schema types in Usd.
Definition: schemaBase.h:56
USDLUX_API UsdAttribute CreateEnableColorTemperatureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetEnableColorTemperatureAttr(), and also Create vs Get Property Methods for when to use Get vs C...
Base class for all transformable prims, which allows arbitrary sequences of component affine transfor...
Definition: xformable.h:252
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:182