All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
rectLight.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_RECTLIGHT_H
8#define USDLUX_GENERATED_RECTLIGHT_H
9
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"
18
19#include "pxr/base/vt/value.h"
20
21#include "pxr/base/gf/vec3d.h"
22#include "pxr/base/gf/vec3f.h"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// RECTLIGHT //
34// -------------------------------------------------------------------------- //
35
45{
46public:
50 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
51
56 explicit UsdLuxRectLight(const UsdPrim& prim=UsdPrim())
58 {
59 }
60
64 explicit UsdLuxRectLight(const UsdSchemaBase& schemaObj)
65 : UsdLuxBoundableLightBase(schemaObj)
66 {
67 }
68
70 USDLUX_API
72
76 USDLUX_API
77 static const TfTokenVector &
78 GetSchemaAttributeNames(bool includeInherited=true);
79
89 USDLUX_API
90 static UsdLuxRectLight
91 Get(const UsdStagePtr &stage, const SdfPath &path);
92
115 USDLUX_API
116 static UsdLuxRectLight
117 Define(const UsdStagePtr &stage, const SdfPath &path);
118
119protected:
123 USDLUX_API
125
126private:
127 // needs to invoke _GetStaticTfType.
128 friend class UsdSchemaRegistry;
129 USDLUX_API
130 static const TfType &_GetStaticTfType();
131
132 static bool _IsTypedSchema();
133
134 // override SchemaBase virtuals.
135 USDLUX_API
136 const TfType &_GetTfType() const override;
137
138public:
139 // --------------------------------------------------------------------- //
140 // WIDTH
141 // --------------------------------------------------------------------- //
149 USDLUX_API
151
157 USDLUX_API
158 UsdAttribute CreateWidthAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
159
160public:
161 // --------------------------------------------------------------------- //
162 // HEIGHT
163 // --------------------------------------------------------------------- //
171 USDLUX_API
173
179 USDLUX_API
180 UsdAttribute CreateHeightAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
181
182public:
183 // --------------------------------------------------------------------- //
184 // TEXTUREFILE
185 // --------------------------------------------------------------------- //
193 USDLUX_API
195
201 USDLUX_API
202 UsdAttribute CreateTextureFileAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
203
204public:
205 // ===================================================================== //
206 // Feel free to add custom code below this line, it will be preserved by
207 // the code generator.
208 //
209 // Just remember to:
210 // - Close the class declaration with };
211 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
212 // - Close the include guard with #endif
213 // ===================================================================== //
214 // --(BEGIN CUSTOM CODE)--
215};
216
217PXR_NAMESPACE_CLOSE_SCOPE
218
219#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
TfType represents a dynamic runtime type.
Definition: type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:160
Base class for intrinsic lights that are boundable.
Light emitted from one side of a rectangle.
Definition: rectLight.h:45
static USDLUX_API UsdLuxRectLight Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDLUX_API UsdAttribute GetWidthAttr() const
Width of the rectangle, in the local X axis.
USDLUX_API UsdAttribute GetHeightAttr() const
Height of the rectangle, in the local Y axis.
virtual USDLUX_API ~UsdLuxRectLight()
Destructor.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: rectLight.h:50
USDLUX_API UsdAttribute CreateTextureFileAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTextureFileAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLUX_API UsdAttribute CreateHeightAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetHeightAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDLUX_API UsdLuxRectLight Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLuxRectLight holding the prim adhering to this schema at path on stage.
USDLUX_API UsdAttribute CreateWidthAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetWidthAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdLuxRectLight(const UsdSchemaBase &schemaObj)
Construct a UsdLuxRectLight on the prim held by schemaObj .
Definition: rectLight.h:64
UsdLuxRectLight(const UsdPrim &prim=UsdPrim())
Construct a UsdLuxRectLight on UsdPrim prim .
Definition: rectLight.h:56
USDLUX_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDLUX_API UsdAttribute GetTextureFileAttr() const
A color texture to use on the rectangle.
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...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440