HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
boundableLightBase.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_BOUNDABLELIGHTBASE_H
8 #define USDLUX_GENERATED_BOUNDABLELIGHTBASE_H
9 
10 /// \file usdLux/boundableLightBase.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/lightAPI.h"
18 
19 #include "pxr/base/vt/value.h"
20 
21 #include "pxr/base/gf/vec3d.h"
22 #include "pxr/base/gf/vec3f.h"
23 #include "pxr/base/gf/matrix4d.h"
24 
25 #include "pxr/base/tf/token.h"
26 #include "pxr/base/tf/type.h"
27 
29 
30 class SdfAssetPath;
31 
32 // -------------------------------------------------------------------------- //
33 // BOUNDABLELIGHTBASE //
34 // -------------------------------------------------------------------------- //
35 
36 /// \class UsdLuxBoundableLightBase
37 ///
38 /// Base class for intrinsic lights that are boundable.
39 ///
40 /// The primary purpose of this class is to provide a direct API to the
41 /// functions provided by LightAPI for concrete derived light types.
42 ///
43 ///
45 {
46 public:
47  /// Compile time constant representing what kind of schema this class is.
48  ///
49  /// \sa UsdSchemaKind
51 
52  /// Construct a UsdLuxBoundableLightBase on UsdPrim \p prim .
53  /// Equivalent to UsdLuxBoundableLightBase::Get(prim.GetStage(), prim.GetPath())
54  /// for a \em valid \p prim, but will not immediately throw an error for
55  /// an invalid \p prim
56  explicit UsdLuxBoundableLightBase(const UsdPrim& prim=UsdPrim())
57  : UsdGeomBoundable(prim)
58  {
59  }
60 
61  /// Construct a UsdLuxBoundableLightBase on the prim held by \p schemaObj .
62  /// Should be preferred over UsdLuxBoundableLightBase(schemaObj.GetPrim()),
63  /// as it preserves SchemaBase state.
64  explicit UsdLuxBoundableLightBase(const UsdSchemaBase& schemaObj)
65  : UsdGeomBoundable(schemaObj)
66  {
67  }
68 
69  /// Destructor.
71  virtual ~UsdLuxBoundableLightBase();
72 
73  /// Return a vector of names of all pre-declared attributes for this schema
74  /// class and all its ancestor classes. Does not include attributes that
75  /// may be authored by custom/extended methods of the schemas involved.
77  static const TfTokenVector &
78  GetSchemaAttributeNames(bool includeInherited=true);
79 
80  /// Return a UsdLuxBoundableLightBase holding the prim adhering to this
81  /// schema at \p path on \p stage. If no prim exists at \p path on
82  /// \p stage, or if the prim at that path does not adhere to this schema,
83  /// return an invalid schema object. This is shorthand for the following:
84  ///
85  /// \code
86  /// UsdLuxBoundableLightBase(stage->GetPrimAtPath(path));
87  /// \endcode
88  ///
91  Get(const UsdStagePtr &stage, const SdfPath &path);
92 
93 
94 protected:
95  /// Returns the kind of schema this class belongs to.
96  ///
97  /// \sa UsdSchemaKind
99  UsdSchemaKind _GetSchemaKind() const override;
100 
101 private:
102  // needs to invoke _GetStaticTfType.
103  friend class UsdSchemaRegistry;
104  USDLUX_API
105  static const TfType &_GetStaticTfType();
106 
107  static bool _IsTypedSchema();
108 
109  // override SchemaBase virtuals.
110  USDLUX_API
111  const TfType &_GetTfType() const override;
112 
113 public:
114  /// \name LightAPI
115  ///
116  /// Convenience accessors for the built-in UsdLuxLightAPI
117  ///
118  /// @{
119 
120  /// Constructs and returns a UsdLuxLightAPI object.
121  /// Use this object to access UsdLuxLightAPI custom methods.
122  USDLUX_API
123  UsdLuxLightAPI LightAPI() const;
124 
125  /// See UsdLuxLightAPI::GetShaderIdAttr().
126  USDLUX_API
128 
129  /// See UsdLuxLightAPI::CreateShaderIdAttr().
130  USDLUX_API
132  VtValue const &defaultValue = VtValue(),
133  bool writeSparsely=false) const;
134 
135  /// See UsdLuxLightAPI::GetMaterialSyncModeAttr().
136  USDLUX_API
138 
139  /// See UsdLuxLightAPI::CreateMaterialSyncModeAttr().
140  USDLUX_API
142  VtValue const &defaultValue = VtValue(),
143  bool writeSparsely=false) const;
144 
145  /// See UsdLuxLightAPI::GetIntensityAttr().
146  USDLUX_API
148 
149  /// See UsdLuxLightAPI::CreateIntensityAttr().
150  USDLUX_API
152  VtValue const &defaultValue = VtValue(),
153  bool writeSparsely=false) const;
154 
155  /// See UsdLuxLightAPI::GetExposureAttr().
156  USDLUX_API
158 
159  /// See UsdLuxLightAPI::CreateExposureAttr().
160  USDLUX_API
162  VtValue const &defaultValue = VtValue(),
163  bool writeSparsely=false) const;
164 
165  /// See UsdLuxLightAPI::GetDiffuseAttr().
166  USDLUX_API
168 
169  /// See UsdLuxLightAPI::CreateDiffuseAttr().
170  USDLUX_API
172  VtValue const &defaultValue = VtValue(),
173  bool writeSparsely=false) const;
174 
175  /// See UsdLuxLightAPI::GetSpecularAttr().
176  USDLUX_API
178 
179  /// See UsdLuxLightAPI::CreateSpecularAttr().
180  USDLUX_API
182  VtValue const &defaultValue = VtValue(),
183  bool writeSparsely=false) const;
184 
185  /// See UsdLuxLightAPI::GetNormalizeAttr().
186  USDLUX_API
188 
189  /// See UsdLuxLightAPI::CreateNormalizeAttr().
190  USDLUX_API
192  VtValue const &defaultValue = VtValue(),
193  bool writeSparsely=false) const;
194 
195  /// See UsdLuxLightAPI::GetColorAttr().
196  USDLUX_API
197  UsdAttribute GetColorAttr() const;
198 
199  /// See UsdLuxLightAPI::CreateColorAttr().
200  USDLUX_API
202  VtValue const &defaultValue = VtValue(),
203  bool writeSparsely=false) const;
204 
205  /// See UsdLuxLightAPI::GetEnableColorTemperatureAttr().
206  USDLUX_API
208 
209  /// See UsdLuxLightAPI::CreateEnableColorTemperatureAttr().
210  USDLUX_API
212  VtValue const &defaultValue = VtValue(),
213  bool writeSparsely=false) const;
214 
215  /// See UsdLuxLightAPI::GetColorTemperatureAttr().
216  USDLUX_API
218 
219  /// See UsdLuxLightAPI::CreateColorTemperatureAttr().
220  USDLUX_API
222  VtValue const &defaultValue = VtValue(),
223  bool writeSparsely=false) const;
224 
225  /// See UsdLuxLightAPI::GetFiltersRel().
226  USDLUX_API
228 
229  /// See UsdLuxLightAPI::CreateFiltersRel().
230  USDLUX_API
232 
233  /// @}
234 public:
235  // ===================================================================== //
236  // Feel free to add custom code below this line, it will be preserved by
237  // the code generator.
238  //
239  // Just remember to:
240  // - Close the class declaration with };
241  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
242  // - Close the include guard with #endif
243  // ===================================================================== //
244  // --(BEGIN CUSTOM CODE)--
245 };
246 
248 
249 #endif
USDLUX_API UsdAttribute GetNormalizeAttr() const
See UsdLuxLightAPI::GetNormalizeAttr().
USDLUX_API UsdAttribute GetMaterialSyncModeAttr() const
See UsdLuxLightAPI::GetMaterialSyncModeAttr().
USDLUX_API UsdAttribute GetSpecularAttr() const
See UsdLuxLightAPI::GetSpecularAttr().
USDLUX_API UsdAttribute CreateIntensityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateIntensityAttr().
USDLUX_API UsdAttribute CreateColorTemperatureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateColorTemperatureAttr().
USDLUX_API UsdAttribute CreateEnableColorTemperatureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateEnableColorTemperatureAttr().
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
USDLUX_API UsdAttribute CreateDiffuseAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateDiffuseAttr().
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
USDLUX_API UsdAttribute GetColorAttr() const
See UsdLuxLightAPI::GetColorAttr().
#define USDLUX_API
Definition: api.h:23
USDLUX_API UsdAttribute GetExposureAttr() const
See UsdLuxLightAPI::GetExposureAttr().
UsdLuxBoundableLightBase(const UsdSchemaBase &schemaObj)
USDLUX_API UsdAttribute GetIntensityAttr() const
See UsdLuxLightAPI::GetIntensityAttr().
static const UsdSchemaKind schemaKind
UsdLuxBoundableLightBase(const UsdPrim &prim=UsdPrim())
USDLUX_API UsdAttribute GetEnableColorTemperatureAttr() const
See UsdLuxLightAPI::GetEnableColorTemperatureAttr().
USDLUX_API UsdAttribute CreateShaderIdAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateShaderIdAttr().
Represents a non-concrete typed schema.
USDLUX_API UsdAttribute GetColorTemperatureAttr() const
See UsdLuxLightAPI::GetColorTemperatureAttr().
USDLUX_API UsdAttribute GetDiffuseAttr() const
See UsdLuxLightAPI::GetDiffuseAttr().
USDLUX_API UsdRelationship GetFiltersRel() const
See UsdLuxLightAPI::GetFiltersRel().
static USDLUX_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
USDLUX_API UsdAttribute CreateSpecularAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateSpecularAttr().
USDLUX_API UsdAttribute CreateMaterialSyncModeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateMaterialSyncModeAttr().
Definition: path.h:280
USDLUX_API UsdRelationship CreateFiltersRel() const
See UsdLuxLightAPI::CreateFiltersRel().
UsdSchemaKind
Definition: common.h:112
USDLUX_API UsdAttribute CreateNormalizeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateNormalizeAttr().
USDLUX_API UsdAttribute CreateColorAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateColorAttr().
USDLUX_API UsdAttribute CreateExposureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See UsdLuxLightAPI::CreateExposureAttr().
USDLUX_API UsdSchemaKind _GetSchemaKind() const override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47
USDLUX_API UsdLuxLightAPI LightAPI() const
virtual USDLUX_API ~UsdLuxBoundableLightBase()
Destructor.
USDLUX_API UsdAttribute GetShaderIdAttr() const
See UsdLuxLightAPI::GetShaderIdAttr().
static USDLUX_API UsdLuxBoundableLightBase Get(const UsdStagePtr &stage, const SdfPath &path)
Definition: value.h:89