Loading...
Searching...
No Matches
lightFilter.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_LIGHTFILTER_H
25#define USDLUX_GENERATED_LIGHTFILTER_H
26
28
29#include "pxr/pxr.h"
30#include "pxr/usd/usdLux/api.h"
32#include "pxr/usd/usd/prim.h"
33#include "pxr/usd/usd/stage.h"
35
37#include "pxr/usd/usdShade/input.h"
38#include "pxr/usd/usdShade/output.h"
39
40#include "pxr/base/vt/value.h"
41
42#include "pxr/base/gf/vec3d.h"
43#include "pxr/base/gf/vec3f.h"
45
46#include "pxr/base/tf/token.h"
47#include "pxr/base/tf/type.h"
48
49PXR_NAMESPACE_OPEN_SCOPE
50
51class SdfAssetPath;
52
53// -------------------------------------------------------------------------- //
54// LIGHTFILTER //
55// -------------------------------------------------------------------------- //
56
79{
80public:
84 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
85
90 explicit UsdLuxLightFilter(const UsdPrim& prim=UsdPrim())
91 : UsdGeomXformable(prim)
92 {
93 }
94
98 explicit UsdLuxLightFilter(const UsdSchemaBase& schemaObj)
99 : UsdGeomXformable(schemaObj)
100 {
101 }
102
104 USDLUX_API
106
110 USDLUX_API
111 static const TfTokenVector &
112 GetSchemaAttributeNames(bool includeInherited=true);
113
123 USDLUX_API
124 static UsdLuxLightFilter
125 Get(const UsdStagePtr &stage, const SdfPath &path);
126
149 USDLUX_API
150 static UsdLuxLightFilter
151 Define(const UsdStagePtr &stage, const SdfPath &path);
152
153protected:
157 USDLUX_API
159
160private:
161 // needs to invoke _GetStaticTfType.
162 friend class UsdSchemaRegistry;
163 USDLUX_API
164 static const TfType &_GetStaticTfType();
165
166 static bool _IsTypedSchema();
167
168 // override SchemaBase virtuals.
169 USDLUX_API
170 const TfType &_GetTfType() const override;
171
172public:
173 // --------------------------------------------------------------------- //
174 // SHADERID
175 // --------------------------------------------------------------------- //
192 USDLUX_API
194
200 USDLUX_API
201 UsdAttribute CreateShaderIdAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
202
203public:
204 // ===================================================================== //
205 // Feel free to add custom code below this line, it will be preserved by
206 // the code generator.
207 //
208 // Just remember to:
209 // - Close the class declaration with };
210 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
211 // - Close the include guard with #endif
212 // ===================================================================== //
213 // --(BEGIN CUSTOM CODE)--
214
215 // -------------------------------------------------------------------------
219
223 USDLUX_API
225
235 USDLUX_API
237
239
240 // -------------------------------------------------------------------------
247
253 USDLUX_API
255 const SdfValueTypeName& typeName);
256
259 USDLUX_API
260 UsdShadeOutput GetOutput(const TfToken &name) const;
261
266 USDLUX_API
267 std::vector<UsdShadeOutput> GetOutputs(bool onlyAuthored=true) const;
268
270
271 // -------------------------------------------------------------------------
272
280
285 USDLUX_API
287 const SdfValueTypeName& typeName);
288
291 USDLUX_API
292 UsdShadeInput GetInput(const TfToken &name) const;
293
298 USDLUX_API
299 std::vector<UsdShadeInput> GetInputs(bool onlyAuthored=true) const;
300
302
306 USDLUX_API
308
323 USDLUX_API
325 const TfToken &renderContext) const;
326
334 USDLUX_API
336 const TfToken &renderContext,
337 VtValue const &defaultValue = VtValue(),
338 bool writeSparsely=false) const;
339
355 USDLUX_API
356 TfToken GetShaderId(const TfTokenVector &renderContexts) const;
357
358};
359
360PXR_NAMESPACE_CLOSE_SCOPE
361
362#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:47
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
Represents a value type name, i.e.
Definition: valueTypeName.h:88
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
TfType represents a dynamic runtime type.
Definition: type.h:65
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:176
This is a general purpose API schema, used to describe a collection of heterogeneous objects within t...
Base class for all transformable prims, which allows arbitrary sequences of component affine transfor...
Definition: xformable.h:253
A light filter modifies the effect of a light.
Definition: lightFilter.h:79
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:98
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: lightFilter.h:84
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:90
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:134
The base class for all schema types in Usd.
Definition: schemaBase.h:56
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:49
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
Definition: output.h:48
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:164
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:129
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:457