Loading...
Searching...
No Matches
debuggingSceneIndex.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//
7#ifndef PXR_IMAGING_HDSI_DEBUGGING_SCENE_INDEX_H
8#define PXR_IMAGING_HDSI_DEBUGGING_SCENE_INDEX_H
9
10#include "pxr/imaging/hd/filteringSceneIndex.h"
11#include "pxr/imaging/hdsi/api.h"
12#include "pxr/pxr.h"
13
14#include <optional>
15#include <map>
16#include <mutex>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
21
22namespace HdsiDebuggingSceneIndex_Impl
23{
24
25struct _PrimInfo;
26using _PrimInfoSharedPtr = std::shared_ptr<_PrimInfo>;
27using _PrimMap = std::map<SdfPath, _PrimInfo>;
28
29}
30
44{
45public:
46 HDSI_API
47 static HdsiDebuggingSceneIndexRefPtr
48 New(HdSceneIndexBaseRefPtr const &inputSceneIndex,
49 HdContainerDataSourceHandle const &inputArgs);
50
51 HDSI_API
52 ~HdsiDebuggingSceneIndex() override;
53
54 HDSI_API
55 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
56
57 HDSI_API
58 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
59
60protected:
61 HDSI_API
62 void _PrimsAdded(
63 const HdSceneIndexBase &sender,
64 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
65
66 HDSI_API
67 void _PrimsRemoved(
68 const HdSceneIndexBase &sender,
69 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
70
71 HDSI_API
72 void _PrimsDirtied(
73 const HdSceneIndexBase &sender,
74 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
75
76 HDSI_API
77 void _PrimsRenamed(
78 const HdSceneIndexBase &sender,
79 const HdSceneIndexObserver::RenamedPrimEntries &entries) override;
80
81private:
82 HdsiDebuggingSceneIndex(HdSceneIndexBaseRefPtr const &inputSceneIndex,
83 HdContainerDataSourceHandle const &inputArgs);
84
85 mutable std::mutex _primsMutex;
86 mutable HdsiDebuggingSceneIndex_Impl::_PrimMap _prims;
87};
88
89PXR_NAMESPACE_CLOSE_SCOPE
90
91#endif // PXR_IMAGING_HD_DEBUGGING_SCENE_INDEX_H
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 filtering scene index that checks for certain inconsistencies (without transforming the scene) in i...
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
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35