7#ifndef PXR_IMAGING_HDSI_EXPRESSION_EVALUATING_SCENE_INDEX_BASE_H
8#define PXR_IMAGING_HDSI_EXPRESSION_EVALUATING_SCENE_INDEX_BASE_H
11#include "pxr/imaging/hdsi/api.h"
13#include "pxr/imaging/hd/instancingAwareCollectionExpressionEvaluator.h"
14#include "pxr/imaging/hd/filteringSceneIndex.h"
15#include "pxr/imaging/hd/sceneIndexObserver.h"
17#include "pxr/usd/sdf/path.h"
18#include "pxr/usd/sdf/pathExpression.h"
20PXR_NAMESPACE_OPEN_SCOPE
75 const HdSceneIndexBaseRefPtr &inputSceneIndex,
76 const HdCollectionPredicateLibrary &predicateLibrary);
93 const
SdfPath &primPath, SdfPathVector *children) const;
115 using OptionalAddedEntries =
117 using OptionalRemovedEntries =
119 using OptionalDirtiedEntries =
122 struct NoticeProcessingResult {
123 static NoticeProcessingResult ForwardInputNotices() {
124 return NoticeProcessingResult(
true);
127 static NoticeProcessingResult Empty() {
128 return NoticeProcessingResult(
false);
131 explicit NoticeProcessingResult(
bool forwardInputNotices)
132 : forwardInputNotices(forwardInputNotices) {}
134 NoticeProcessingResult& SetAddedEntries(
136 addedEntries = entries;
140 NoticeProcessingResult& SetRemovedEntries(
142 removedEntries = entries;
146 NoticeProcessingResult& SetDirtiedEntries(
148 dirtiedEntries = entries;
152 bool forwardInputNotices;
153 OptionalAddedEntries addedEntries;
154 OptionalRemovedEntries removedEntries;
155 OptionalDirtiedEntries dirtiedEntries;
159 virtual NoticeProcessingResult _PrimsAdded(
163 virtual NoticeProcessingResult _PrimsRemoved(
167 virtual NoticeProcessingResult _PrimsDirtied(
174 virtual NoticeProcessingResult _PrimsRenamed(
199 const SdfPathSet &outermostInstancePaths)
const;
207 friend class _Observer;
222 const AddedPrimEntries &entries)
override;
227 const RemovedPrimEntries &entries)
override;
232 const DirtiedPrimEntries &entries)
override;
237 const RenamedPrimEntries &entries)
override;
245 const HdSceneIndexBaseRefPtr _inputSceneIndex;
251 const HdInstanceProxyViewSceneIndexRefPtr _proxyViewSceneIndex;
255PXR_NAMESPACE_CLOSE_SCOPE
A mix-in class for scene indices that implement their behaviour by creating other scene indices (inte...
An abstract base class for scene indexes that have one or more input scene indexes which serve as a b...
A scene index that provides a topological view of the scene as though instancing were not being used.
A wrapper around HdCollectionExpressionEvaluator that uses the "unrolled" instance proxy view of the ...
Abstract interface to scene data.
An abstract base class for scene indices that evaluate path expressions against a scene.
HDSI_API HdInstancingAwareCollectionExpressionEvaluator _MakeEvaluator(const SdfPathExpression &pathExpr) const
Constructs an HdInstancingAwareCollectionExpressionEvaluator for the given pathExpr using the predica...
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const final
Delegates to the input scene index, then calls _ModifyPrim.
HDSI_API SdfPathVector GetInstancerPrimPaths(const SdfPathSet &outermostInstancePaths) const
Given a set of outermost instance prim paths (e.g.
virtual HDSI_API void _FilterChildPrimPaths(const SdfPath &primPath, SdfPathVector *children) const
Called by GetChildPrimPaths after querying the input scene index.
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const final
Delegates to the input scene index, then calls _FilterChildPrimPaths.
HDSI_API const HdSceneIndexBaseRefPtr & _GetInputSceneIndex() const
Returns the input scene index.
HDSI_API std::vector< HdSceneIndexBaseRefPtr > GetInputScenes() const final
Returns {_inputSceneIndex}.
virtual HDSI_API void _ModifyPrim(const SdfPath &primPath, HdSceneIndexPrim *prim) const
Called by GetPrim after querying the input scene index.
HDSI_API std::vector< HdSceneIndexBaseRefPtr > GetEncapsulatedScenes() const override
Returns {_proxyViewSceneIndex}.
virtual HDSI_API bool _IsPruned(const SdfPath &primPath) const
Override to bail early from GetPrim and GetChildPrimPaths for pruned prims.
Objects of this class represent a logical expression syntax tree consisting of SdfPathPattern s,...
A path value used to locate objects in layers or scenegraphs.
Represents a library of predicate functions for use with SdfPredicateExpression.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Small struct representing a 'prim' in the Hydra scene index.