Loading...
Searching...
No Matches
lightListAPI.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_LIGHTLISTAPI_H
8#define USDLUX_GENERATED_LIGHTLISTAPI_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// LIGHTLISTAPI //
34// -------------------------------------------------------------------------- //
35
164{
165public:
170
175 explicit UsdLuxLightListAPI(const UsdPrim& prim=UsdPrim())
176 : UsdAPISchemaBase(prim)
177 {
178 }
179
183 explicit UsdLuxLightListAPI(const UsdSchemaBase& schemaObj)
184 : UsdAPISchemaBase(schemaObj)
185 {
186 }
187
189 USDLUX_API
191
195 USDLUX_API
196 static const TfTokenVector &
197 GetSchemaAttributeNames(bool includeInherited=true);
198
208 USDLUX_API
209 static UsdLuxLightListAPI
210 Get(const UsdStagePtr &stage, const SdfPath &path);
211
212
229 USDLUX_API
230 static bool
231 CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
232
248 USDLUX_API
249 static UsdLuxLightListAPI
250 Apply(const UsdPrim &prim);
251
252protected:
256 USDLUX_API
258
259private:
260 // needs to invoke _GetStaticTfType.
261 friend class UsdSchemaRegistry;
262 USDLUX_API
263 static const TfType &_GetStaticTfType();
264
265 static bool _IsTypedSchema();
266
267 // override SchemaBase virtuals.
268 USDLUX_API
269 const TfType &_GetTfType() const override;
270
271public:
272 // --------------------------------------------------------------------- //
273 // LIGHTLISTCACHEBEHAVIOR
274 // --------------------------------------------------------------------- //
296 USDLUX_API
298
304 USDLUX_API
305 UsdAttribute CreateLightListCacheBehaviorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
306
307public:
308 // --------------------------------------------------------------------- //
309 // LIGHTLIST
310 // --------------------------------------------------------------------- //
313 USDLUX_API
315
318 USDLUX_API
320
321public:
322 // ===================================================================== //
323 // Feel free to add custom code below this line, it will be preserved by
324 // the code generator.
325 //
326 // Just remember to:
327 // - Close the class declaration with };
328 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
329 // - Close the include guard with #endif
330 // ===================================================================== //
331 // --(BEGIN CUSTOM CODE)--
332
341
361 USDLUX_API
362 SdfPathSet ComputeLightList(ComputeMode mode) const;
363
368 USDLUX_API
369 void StoreLightList(const SdfPathSet &) const;
370
373 USDLUX_API
375};
376
377PXR_NAMESPACE_CLOSE_SCOPE
378
379#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
TfType represents a dynamic runtime type.
Definition type.h:48
The base class for all API schemas.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition attribute.h:183
API schema to support discovery and publishing of lights in a scene.
USDLUX_API void StoreLightList(const SdfPathSet &) const
Store the given paths as the lightlist for this prim.
USDLUX_API SdfPathSet ComputeLightList(ComputeMode mode) const
Computes and returns the list of lights and light filters in the stage, optionally consulting a cache...
USDLUX_API UsdRelationship GetLightListRel() const
Relationship to lights in the scene.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
ComputeMode
Runtime control over whether to consult stored lightList caches.
@ ComputeModeConsultModelHierarchyCache
Consult any caches found on the model hierarchy.
@ ComputeModeIgnoreCache
Ignore any caches found, and do a full prim traversal.
USDLUX_API UsdRelationship CreateLightListRel() const
See GetLightListRel(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLUX_API void InvalidateLightList() const
Mark any stored lightlist as invalid, by setting the lightList:cacheBehavior attribute to ignore.
USDLUX_API UsdAttribute CreateLightListCacheBehaviorAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLightListCacheBehaviorAttr(), and also Create vs Get Property Methods for when to use Get vs C...
UsdLuxLightListAPI(const UsdSchemaBase &schemaObj)
Construct a UsdLuxLightListAPI on the prim held by schemaObj .
USDLUX_API UsdAttribute GetLightListCacheBehaviorAttr() const
Controls how the lightList should be interpreted.
virtual USDLUX_API ~UsdLuxLightListAPI()
Destructor.
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...
UsdLuxLightListAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdLuxLightListAPI on UsdPrim prim .
static USDLUX_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
Returns true if this single-apply API schema can be applied to the given prim.
static USDLUX_API UsdLuxLightListAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLuxLightListAPI holding the prim adhering to this schema at path on stage.
static USDLUX_API UsdLuxLightListAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition prim.h:117
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
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:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ SingleApplyAPI
Single Apply API 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