6#ifndef PXR_IMAGING_HDSI_UNBOUND_MATERIAL_PRUNING_SCENE_INDEX_H
7#define PXR_IMAGING_HDSI_UNBOUND_MATERIAL_PRUNING_SCENE_INDEX_H
11#include "pxr/imaging/hdsi/api.h"
12#include "pxr/imaging/hd/filteringSceneIndex.h"
15#include "pxr/usd/sdf/path.h"
18#include <unordered_set>
20PXR_NAMESPACE_OPEN_SCOPE
22#define HDSI_UNBOUND_MATERIAL_PRUNING_SCENE_INDEX_TOKENS \
23 (materialBindingPurposes)
26 HDSI_UNBOUND_MATERIAL_PRUNING_SCENE_INDEX_TOKENS);
46 static HdsiUnboundMaterialPruningSceneIndexRefPtr
47 New(HdSceneIndexBaseRefPtr
const &inputSceneIndex,
48 HdContainerDataSourceHandle
const &inputArgs);
73 HdSceneIndexBaseRefPtr
const &inputSceneIndex,
74 HdContainerDataSourceHandle
const &inputArgs);
80 void _PopulateFromInputSceneIndex();
82 bool _IsBoundMaterial(
const SdfPath &materialPath)
const;
83 bool _WasAdded(
const SdfPath &materialPath)
const;
87 std::unordered_set<SdfPath, SdfPath::Hash> _boundMaterialPaths;
88 std::unordered_set<SdfPath, SdfPath::Hash> _addedMaterialPaths;
91PXR_NAMESPACE_CLOSE_SCOPE
Represents a set of data source locators closed under descendancy.
Abstract interface to scene data.
A scene index that prunes material prims that are not bound.
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.
Represents an arbitrary dimensional rectangular container class.
Standard pointer typedefs.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Small struct representing a 'prim' in the Hydra scene index.