Loading...
Searching...
No Matches
light.h
1//
2// Copyright 2019 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_H
8#define EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/light.h"
12#include "Riley.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16class HdSceneDelegate;
17class HdPrman_RenderParam;
18
23class HdPrmanLight final : public HdLight
24{
25public:
26 HdPrmanLight(SdfPath const& id, TfToken const& lightType);
27 ~HdPrmanLight() override;
28
30 void Sync(HdSceneDelegate *sceneDelegate,
31 HdRenderParam *renderParam,
32 HdDirtyBits *dirtyBits) override;
33
37 HdDirtyBits GetInitialDirtyBitsMask() const override;
38
39 void Finalize(HdRenderParam *renderParam) override;
40
41private:
42
43 const TfToken _hdLightType;
44 riley::LightShaderId _shaderId;
45 riley::LightInstanceId _instanceId;
46
47 // state for change tracking
48 riley::GeometryPrototypeId _geometryPrototypeId;
49 SdfPath _sourceGeomPath;
50 RtUString _lightShaderType;
51 TfToken _lightLink;
52 SdfPathVector _lightFilterPaths;
53 std::vector<TfToken> _lightFilterLinks;
54 TfToken _shadowLink;
55};
56
57
58PXR_NAMESPACE_CLOSE_SCOPE
59
60#endif // EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_H
A light model, used in conjunction with HdRenderPass.
Definition: light.h:67
A representation for lights.
Definition: light.h:24
void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
Synchronizes state from the delegate to this object.
void Finalize(HdRenderParam *renderParam) override
Finalizes object resources.
HdDirtyBits GetInitialDirtyBitsMask() const override
Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of thi...
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Adapter class providing data exchange with the client scene graph.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71