Loading...
Searching...
No Matches
instanceProxyViewSceneIndex.h
1//
2// Copyright 2026 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_IMAGING_HD_INSTANCE_PROXY_VIEW_SCENE_INDEX_H
8#define PXR_IMAGING_HD_INSTANCE_PROXY_VIEW_SCENE_INDEX_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12
13#include "pxr/imaging/hd/filteringSceneIndex.h"
14#include "pxr/usd/sdf/path.h"
16#include "pxr/base/tf/token.h"
17
18#include <memory>
19
20PXR_NAMESPACE_OPEN_SCOPE
21
23
49{
50public:
51 HD_API
52 static HdInstanceProxyViewSceneIndexRefPtr
53 New(const HdSceneIndexBaseRefPtr &inputSceneIndex);
54
55 // ------------------------------------------------------------------------
56 // Non-virtual API.
57 //
61 HD_API
62 bool IsInstanceProxy(const SdfPath &primPath) const;
63
68 HD_API
69 bool IsOutermostInstance(const SdfPath &primPath) const;
70
72 HD_API
73 const SdfPathSet &GetAllOutermostInstancePrimPaths() const;
74
75 // ------------------------------------------------------------------------
76 // HdSceneIndex overrides.
77 //
80 HD_API
81 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
82
86 HD_API
87 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
88
89protected:
90
91 HD_API
93 const HdSceneIndexBaseRefPtr &inputSceneIndex);
94
95 // ------------------------------------------------------------------------
96 // HdSingleInputFilteringSceneIndexBase overrides.
97 //
98 HD_API
99 void _PrimsAdded(
100 const HdSceneIndexBase &sender,
101 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
102
103 HD_API
104 void _PrimsRemoved(
105 const HdSceneIndexBase &sender,
106 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
107
108 HD_API
109 void _PrimsDirtied(
110 const HdSceneIndexBase &sender,
111 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
112
113private:
114 struct _Impl;
115 std::unique_ptr<_Impl> _impl;
116};
117
118PXR_NAMESPACE_CLOSE_SCOPE
119
120#endif
A scene index that provides a topological view of the scene as though instancing were not being used.
HD_API const SdfPathSet & GetAllOutermostInstancePrimPaths() const
Returns the set of all tracked outermost instance prim paths.
HD_API bool IsInstanceProxy(const SdfPath &primPath) const
Returns true if the given prim path is an instance proxy prim path matching the USD definition of an ...
HD_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Adds support for instance proxy prim paths.
HD_API bool IsOutermostInstance(const SdfPath &primPath) const
Returns true if the given prim path is a leaf instance prim path that isn't under an instancer prim.
HD_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Adds support for queries on outer (leaf) instance prim paths and instance proxy prim paths.
Abstract interface to scene data.
Definition sceneIndex.h:55
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:281
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition declarePtrs.h:58
This file defines some macros that are useful for declaring and using static TfTokens.
Small struct representing a 'prim' in the Hydra scene index.
Definition sceneIndex.h:36
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...