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
71 // ------------------------------------------------------------------------
72 // HdSceneIndex overrides.
73 //
76 HD_API
77 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
78
82 HD_API
83 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
84
85protected:
86
87 HD_API
89 const HdSceneIndexBaseRefPtr &inputSceneIndex);
90
91 // ------------------------------------------------------------------------
92 // HdSingleInputFilteringSceneIndexBase overrides.
93 //
94 HD_API
95 void _PrimsAdded(
96 const HdSceneIndexBase &sender,
97 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
98
99 HD_API
100 void _PrimsRemoved(
101 const HdSceneIndexBase &sender,
102 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
103
104 HD_API
105 void _PrimsDirtied(
106 const HdSceneIndexBase &sender,
107 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
108
109private:
110 struct _Impl;
111 std::unique_ptr<_Impl> _impl;
112};
113
114PXR_NAMESPACE_CLOSE_SCOPE
115
116#endif
A scene index that provides a topological view of the scene as though instancing were not being used.
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...