HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rootOverridesSceneIndex.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_IMAGING_USD_IMAGING_ROOT_OVERRIDES_SCENE_INDEX_H
25 #define PXR_USD_IMAGING_USD_IMAGING_ROOT_OVERRIDES_SCENE_INDEX_H
26 
28 
30 
32 
34 
35 namespace UsdImagingRootOverridesSceneIndex_Impl
36 {
37 using _RootOverlayInfoSharedPtr = std::shared_ptr<struct _RootOverlayInfo>;
38 }
39 
40 /// \class UsdImagingRootOverridesSceneIndex
41 ///
42 /// Overrides some data sources on the root prim.
43 ///
46 {
47 public:
49  static
50  UsdImagingRootOverridesSceneIndexRefPtr
51  New(HdSceneIndexBaseRefPtr const &inputSceneIndex);
52 
54  HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
55 
57  SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
58 
60  void SetRootTransform(const GfMatrix4d &);
61 
63  const GfMatrix4d& GetRootTransform() const;
64 
66  void SetRootVisibility(bool);
67 
69  const bool GetRootVisibility() const;
70 
71 protected:
72  void _PrimsAdded(
73  const HdSceneIndexBase&,
74  const HdSceneIndexObserver::AddedPrimEntries &entries) override;
75  void _PrimsDirtied(
76  const HdSceneIndexBase&,
77  const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
78  void _PrimsRemoved(
79  const HdSceneIndexBase&,
80  const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
81 
82 private:
84  HdSceneIndexBaseRefPtr const &inputSceneIndex);
85 
87  _RootOverlayInfoSharedPtr const _rootOverlayInfo;
88 
89  HdContainerDataSourceHandle const _rootOverlayDs;
90 };
91 
93 
94 #endif
USDIMAGING_API const GfMatrix4d & GetRootTransform() const
static USDIMAGING_API UsdImagingRootOverridesSceneIndexRefPtr New(HdSceneIndexBaseRefPtr const &inputSceneIndex)
#define USDIMAGING_API
Definition: api.h:40
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(UsdImagingRootOverridesSceneIndex)
USDIMAGING_API void SetRootTransform(const GfMatrix4d &)
std::shared_ptr< struct _RootOverlayInfo > _RootOverlayInfoSharedPtr
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
USDIMAGING_API void SetRootVisibility(bool)
void _PrimsAdded(const HdSceneIndexBase &, const HdSceneIndexObserver::AddedPrimEntries &entries) override
void _PrimsRemoved(const HdSceneIndexBase &, const HdSceneIndexObserver::RemovedPrimEntries &entries) override
Definition: path.h:290
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
Definition: path.h:211
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
void _PrimsDirtied(const HdSceneIndexBase &, const HdSceneIndexObserver::DirtiedPrimEntries &entries) override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
USDIMAGING_API const bool GetRootVisibility() const