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_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_H
8#define EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_H
9
10#include "pxr/imaging/hd/light.h"
11#include "pxr/imaging/hd/sprim.h"
12#include "pxr/imaging/hd/types.h"
13
14#include "pxr/usd/sdf/path.h"
15
16#include "pxr/base/tf/token.h"
17
18#include "pxr/pxr.h"
19
20#include <Riley.h>
21#include <RileyIds.h>
22#include <RiTypesHelper.h>
23
24#include <vector>
25
26PXR_NAMESPACE_OPEN_SCOPE
27
28class HdSceneDelegate;
29class HdPrman_RenderParam;
30
35class HdPrmanLight final : public HdLight
36{
37public:
38 HdPrmanLight(SdfPath const& id, TfToken const& lightType);
39 ~HdPrmanLight() override;
40
42 void Sync(HdSceneDelegate *sceneDelegate,
43 HdRenderParam *renderParam,
44 HdDirtyBits *dirtyBits) override;
45
49 HdDirtyBits GetInitialDirtyBitsMask() const override;
50
51 void Finalize(HdRenderParam *renderParam) override;
52
53private:
54
55 const TfToken _hdLightType;
56 riley::LightShaderId _shaderId;
57 riley::LightInstanceId _instanceId;
58 bool _visibleToCamera;
59
60 RtUString _lightShaderType;
61 TfToken _lightLink;
62 TfToken _shadowLink;
63 SdfPathVector _lightFilterPaths;
64 std::vector<TfToken> _lightFilterLinks;
65 riley::CoordinateSystemId _lightFilterParentCoordSysId;
66
67 // state for mesh light change tracking
68 riley::GeometryPrototypeId _geometryPrototypeId;
69 SdfPath _sourceGeomPath;
70};
71
72PXR_NAMESPACE_CLOSE_SCOPE
73
74#endif // EXT_RMANPKG_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:36
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
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...