Loading...
Searching...
No Matches
lightFilter.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_LIGHTFILTER_H
8#define USDLUX_GENERATED_LIGHTFILTER_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
20#include "pxr/usd/usdShade/input.h"
21#include "pxr/usd/usdShade/output.h"
22
23#include "pxr/base/vt/value.h"
24
25#include "pxr/base/gf/vec3d.h"
26#include "pxr/base/gf/vec3f.h"
28
29#include "pxr/base/tf/token.h"
30#include "pxr/base/tf/type.h"
31
32PXR_NAMESPACE_OPEN_SCOPE
33
34class SdfAssetPath;
35
36// -------------------------------------------------------------------------- //
37// LIGHTFILTER //
38// -------------------------------------------------------------------------- //
39
67{
68public:
73
78 explicit UsdLuxLightFilter(const UsdPrim& prim=UsdPrim())
79 : UsdGeomXformable(prim)
80 {
81 }
82
86 explicit UsdLuxLightFilter(const UsdSchemaBase& schemaObj)
87 : UsdGeomXformable(schemaObj)
88 {
89 }
90
92 USDLUX_API
94
98 USDLUX_API
99 static const TfTokenVector &
100 GetSchemaAttributeNames(bool includeInherited=true);
101
111 USDLUX_API
112 static UsdLuxLightFilter
113 Get(const UsdStagePtr &stage, const SdfPath &path);
114
137 USDLUX_API
138 static UsdLuxLightFilter
139 Define(const UsdStagePtr &stage, const SdfPath &path);
140
141protected:
145 USDLUX_API
147
148private:
149 // needs to invoke _GetStaticTfType.
150 friend class UsdSchemaRegistry;
151 USDLUX_API
152 static const TfType &_GetStaticTfType();
153
154 static bool _IsTypedSchema();
155
156 // override SchemaBase virtuals.
157 USDLUX_API
158 const TfType &_GetTfType() const override;
159
160public:
161 // --------------------------------------------------------------------- //
162 // SHADERID
163 // --------------------------------------------------------------------- //
180 USDLUX_API
182
188 USDLUX_API
189 UsdAttribute CreateShaderIdAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
190
191public:
192 // ===================================================================== //
193 // Feel free to add custom code below this line, it will be preserved by
194 // the code generator.
195 //
196 // Just remember to:
197 // - Close the class declaration with };
198 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
199 // - Close the include guard with #endif
200 // ===================================================================== //
201 // --(BEGIN CUSTOM CODE)--
202
203 // -------------------------------------------------------------------------
207
211 USDLUX_API
213
223 USDLUX_API
225
227
228 // -------------------------------------------------------------------------
235
241 USDLUX_API
243 const SdfValueTypeName& typeName);
244
247 USDLUX_API
248 UsdShadeOutput GetOutput(const TfToken &name) const;
249
254 USDLUX_API
255 std::vector<UsdShadeOutput> GetOutputs(bool onlyAuthored=true) const;
256
258
259 // -------------------------------------------------------------------------
260
268
273 USDLUX_API
275 const SdfValueTypeName& typeName);
276
279 USDLUX_API
280 UsdShadeInput GetInput(const TfToken &name) const;
281
286 USDLUX_API
287 std::vector<UsdShadeInput> GetInputs(bool onlyAuthored=true) const;
288
290
294 USDLUX_API
296
311 USDLUX_API
313 const TfToken &renderContext) const;
314
322 USDLUX_API
324 const TfToken &renderContext,
325 VtValue const &defaultValue = VtValue(),
326 bool writeSparsely=false) const;
327
343 USDLUX_API
344 TfToken GetShaderId(const TfTokenVector &renderContexts) const;
345
346};
347
348PXR_NAMESPACE_CLOSE_SCOPE
349
350#endif
Contains an asset path and optional evaluated and resolved paths.
Definition assetPath.h:79
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
Represents a value type name, i.e.
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:71
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:183
A general purpose API schema used to describe a collection of prims and properties within a scene.
Base class for all transformable prims, which allows arbitrary sequences of component affine transfor...
Definition xformable.h:242
A light filter modifies the effect of a light.
Definition lightFilter.h:67
USDLUX_API TfToken GetShaderId(const TfTokenVector &renderContexts) const
Return the light filter's shader ID for the given list of available renderContexts.
USDLUX_API UsdCollectionAPI GetFilterLinkCollectionAPI() const
Return the UsdCollectionAPI interface used for examining and modifying the filter-linking of this lig...
USDLUX_API UsdLuxLightFilter(const UsdShadeConnectableAPI &connectable)
Constructor that takes a ConnectableAPI object.
virtual USDLUX_API ~UsdLuxLightFilter()
Destructor.
USDLUX_API std::vector< UsdShadeOutput > GetOutputs(bool onlyAuthored=true) const
Outputs are represented by attributes in the "outputs:" namespace.
USDLUX_API UsdShadeOutput CreateOutput(const TfToken &name, const SdfValueTypeName &typeName)
Create an output which can either have a value or can be connected.
UsdLuxLightFilter(const UsdSchemaBase &schemaObj)
Construct a UsdLuxLightFilter on the prim held by schemaObj .
Definition lightFilter.h:86
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition lightFilter.h:72
USDLUX_API UsdShadeInput CreateInput(const TfToken &name, const SdfValueTypeName &typeName)
Create an input which can either have a value or can be connected.
USDLUX_API UsdAttribute GetShaderIdAttr() const
Default ID for the light filter's shader.
USDLUX_API UsdAttribute GetShaderIdAttrForRenderContext(const TfToken &renderContext) const
Returns the shader ID attribute for the given renderContext.
USDLUX_API UsdAttribute CreateShaderIdAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetShaderIdAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLUX_API UsdShadeConnectableAPI ConnectableAPI() const
Contructs and returns a UsdShadeConnectableAPI object with this light filter.
UsdLuxLightFilter(const UsdPrim &prim=UsdPrim())
Construct a UsdLuxLightFilter on UsdPrim prim .
Definition lightFilter.h:78
static USDLUX_API UsdLuxLightFilter Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
static USDLUX_API UsdLuxLightFilter Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLuxLightFilter holding the prim adhering to this schema at path on stage.
USDLUX_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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 UsdShadeOutput GetOutput(const TfToken &name) const
Return the requested output if it exists.
USDLUX_API UsdShadeInput GetInput(const TfToken &name) const
Return the requested input if it exists.
USDLUX_API UsdAttribute CreateShaderIdAttrForRenderContext(const TfToken &renderContext, VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
Creates the shader ID attribute for the given renderContext.
USDLUX_API std::vector< UsdShadeInput > GetInputs(bool onlyAuthored=true) const
Inputs are represented by attributes in the "inputs:" namespace.
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...
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and mak...
This class encapsulates a shader or node-graph input, which is a connectable attribute representing a...
Definition input.h:32
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
Definition output.h:31
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ ConcreteTyped
Represents a concrete typed schema.
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