Loading...
Searching...
No Matches
rootOverridesSceneIndex.h
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_IMAGING_USD_IMAGING_ROOT_OVERRIDES_SCENE_INDEX_H
8#define PXR_USD_IMAGING_USD_IMAGING_ROOT_OVERRIDES_SCENE_INDEX_H
9
10#include "pxr/usdImaging/usdImaging/api.h"
11
12#include "pxr/imaging/hd/filteringSceneIndex.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
17
18namespace UsdImagingRootOverridesSceneIndex_Impl
19{
20using _RootOverlayInfoSharedPtr = std::shared_ptr<struct _RootOverlayInfo>;
21}
22
29{
30public:
31 USDIMAGING_API
32 static
33 UsdImagingRootOverridesSceneIndexRefPtr
34 New(HdSceneIndexBaseRefPtr const &inputSceneIndex);
35
36 USDIMAGING_API
37 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
38
39 USDIMAGING_API
40 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
41
42 USDIMAGING_API
43 void SetRootTransform(const GfMatrix4d &);
44
45 USDIMAGING_API
46 const GfMatrix4d& GetRootTransform() const;
47
48 USDIMAGING_API
49 void SetRootVisibility(bool);
50
51 USDIMAGING_API
52 const bool GetRootVisibility() const;
53
54protected:
55 void _PrimsAdded(
56 const HdSceneIndexBase&,
57 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
58 void _PrimsDirtied(
59 const HdSceneIndexBase&,
60 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
61 void _PrimsRemoved(
62 const HdSceneIndexBase&,
63 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
64
66 HdSceneIndexBaseRefPtr const &inputSceneIndex);
67
68private:
69 UsdImagingRootOverridesSceneIndex_Impl::
70 _RootOverlayInfoSharedPtr const _rootOverlayInfo;
71
72 HdContainerDataSourceHandle const _rootOverlayDs;
73};
74
75PXR_NAMESPACE_CLOSE_SCOPE
76
77#endif
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:71
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.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Overrides some data sources on the root prim.
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35