Loading...
Searching...
No Matches
lightFilter.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_FILTER_H
8#define EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_FILTER_H
9
10#include "pxr/imaging/hd/sprim.h"
11#include "pxr/imaging/hd/types.h"
12
13#include "pxr/usd/sdf/path.h"
14
15#include "pxr/base/tf/token.h"
16
17#include "pxr/pxr.h"
18
19#include <Riley.h>
20#include <RileyIds.h>
21
22#include <mutex>
23
24PXR_NAMESPACE_OPEN_SCOPE
25
26// For now, the procs in this file are boiler plate for when hdPrman needs to
27// have light filters become prime citizens. This will probably happen when
28// its time to implement shared light filters. For now, light filters are
29// handled inside the lights in light.cpp.
30//
31// Also, for now base the HdPrmanLightFilter class on HdSprim as there
32// currently is no HdLightFilter class.
33
34class HdSceneDelegate;
35class HdPrman_RenderParam;
36
41class HdPrmanLightFilter final : public HdSprim
42{
43public:
44 HdPrmanLightFilter(SdfPath const& id, TfToken const& lightFilterType);
45 ~HdPrmanLightFilter() override;
46
48 void Sync(HdSceneDelegate *sceneDelegate,
49 HdRenderParam *renderParam,
50 HdDirtyBits *dirtyBits) override;
51
54 HdSceneDelegate *sceneDelegate,
55 HdPrman_RenderParam *param,
56 riley::Riley *riley);
57
61 HdDirtyBits GetInitialDirtyBitsMask() const override;
62
63 void Finalize(HdRenderParam *renderParam) override;
64
65 riley::CoordinateSystemId GetCoordSysId();
66
67private:
68 void _SyncToRileyWithLock(
69 HdSceneDelegate *sceneDelegate,
70 HdPrman_RenderParam *param,
71 riley::Riley *riley);
72
73 riley::CoordinateSystemId _coordSysId;
74 mutable std::mutex _syncToRileyMutex;
75 bool _rileyIsInSync;
76};
77
78
79PXR_NAMESPACE_CLOSE_SCOPE
80
81#endif // EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_LIGHT_FILTER_H
A representation for light filters.
Definition lightFilter.h:42
void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
Synchronizes state from the delegate to this object.
void SyncToRiley(HdSceneDelegate *sceneDelegate, HdPrman_RenderParam *param, riley::Riley *riley)
Make sure this material has been updated in Riley.
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.
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e....
Definition sprim.h:35
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
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...