Loading...
Searching...
No Matches
domeLightCameraVisibilitySceneIndex.h
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6#ifndef PXR_IMAGING_HDSI_DOME_LIGHT_CAMERA_VISIBILITY_SCENE_INDEX_H
7#define PXR_IMAGING_HDSI_DOME_LIGHT_CAMERA_VISIBILITY_SCENE_INDEX_H
8
9#include "pxr/pxr.h"
10
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/imaging/hdsi/api.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16#define HDSI_DOME_LIGHT_CAMERA_VISIBILITY_SCENE_INDEX_TOKENS \
17 (cameraVisibility)
18
20 HdsiDomeLightCameraVisibilitySceneIndexTokens, HDSI_API,
21 HDSI_DOME_LIGHT_CAMERA_VISIBILITY_SCENE_INDEX_TOKENS);
22
24
25namespace HdsiDomeLightCameraVisibilitySceneIndex_Impl
26{
27class _CameraVisibilityDataSource;
28using _CameraVisibilityDataSourceHandle =
29 std::shared_ptr<_CameraVisibilityDataSource>;
30}
31
41{
42public:
43 HDSI_API
44 static HdsiDomeLightCameraVisibilitySceneIndexRefPtr
45 New(HdSceneIndexBaseRefPtr const &inputSceneIndex);
46
47 HDSI_API
48 void SetDomeLightCameraVisibility(bool visibility);
49
50public:
51 HDSI_API
52 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
53 HDSI_API
54 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
55
56protected:
57 HDSI_API
58 void _PrimsAdded(
59 const HdSceneIndexBase &sender,
60 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
61 HDSI_API
62 void _PrimsRemoved(
63 const HdSceneIndexBase &sender,
64 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
65 HDSI_API
66 void _PrimsDirtied(
67 const HdSceneIndexBase &sender,
68 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
69
70protected:
71 HDSI_API
73 HdSceneIndexBaseRefPtr const &inputSceneIndex);
74 HDSI_API
76
77private:
78 HdsiDomeLightCameraVisibilitySceneIndex_Impl::
79 _CameraVisibilityDataSourceHandle const _cameraVisibilityDataSource;
80
81 SdfPathSet _domeLightPaths;
82};
83
84PXR_NAMESPACE_CLOSE_SCOPE
85
86#endif
Abstract interface to scene data.
Definition: sceneIndex.h:54
An abstract base class for a filtering scene index that observes a single input scene index.
Scene Index that overrides the cameraVisibility of each dome light.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:72
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35