7#ifndef PXR_IMAGING_HDSI_LOCATOR_CACHING_SCENE_INDEX
8#define PXR_IMAGING_HDSI_LOCATOR_CACHING_SCENE_INDEX
10#include "pxr/imaging/hd/api.h"
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/usd/sdf/pathTable.h"
16PXR_NAMESPACE_OPEN_SCOPE
150 static HdSceneIndexBaseRefPtr
152 HdSceneIndexBaseRefPtr
const& inputScene,
154 TfToken const& primTypeToCache,
155 bool const& cacheDescendants =
true);
170 static HdsiLocatorCachingSceneIndexRefPtr
171 New(HdSceneIndexBaseRefPtr
const& inputScene,
173 TfToken const& primTypeToCache,
174 bool const& cacheDescendants =
true);
188 HdSceneIndexBaseRefPtr
const& inputScene,
190 TfToken const& primTypeToCache,
191 bool const& cacheDescendants);
204 const HdDataSourceBaseHandle& args)
override;
211 HD_DECLARE_DATASOURCE(_DataSource);
214 HdDataSourceBaseHandle Get(
const TfToken &name)
override;
221 HdContainerDataSourceHandle
const& inputDataSource);
226 const HdContainerDataSourceHandle _inputDataSource;
231 HdDataSourceBaseHandle
235 HdContainerDataSourceHandle
const& inputDataSource)
const;
240 using _LocatorDataSourceMap =
248 const TfToken _primTypeToCache;
249 const bool _cacheDescendants;
252 mutable _PrimCache _primDsCache;
253 mutable std::mutex _cacheMutex;
256PXR_NAMESPACE_CLOSE_SCOPE
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Represents an object that can identify the location of a data source.
Abstract interface to scene data.
A scene index that caches data sources for specified locators on specified prim types.
static HD_API HdSceneIndexBaseRefPtr AddDependencyForwardingAndCache(HdSceneIndexBaseRefPtr const &inputScene, HdDataSourceLocator const &locatorToCache, TfToken const &primTypeToCache, bool const &cacheDescendants=true)
Creates a new HdDependencyForwardingSceneIndex followed by a HdsiLocatorCachingSceneIndex.
HD_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
static HD_API HdsiLocatorCachingSceneIndexRefPtr New(HdSceneIndexBaseRefPtr const &inputScene, HdDataSourceLocator const &locatorToCache, TfToken const &primTypeToCache, bool const &cacheDescendants=true)
Creates a new HdsiLocatorCachingSceneIndex.
HD_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
void _SystemMessage(const TfToken &messageType, const HdDataSourceBaseHandle &args) override
Implement in order to react directly to system messages sent from downstream.
A path value used to locate objects in layers or scenegraphs.
A mapping from SdfPath to MappedType, somewhat similar to map<SdfPath, MappedType> and TfHashMap<SdfP...
A hash map with contiguous storage, suitable for use with TfSpan, e.g.
Token for efficient comparison, assignment, and hashing of known strings.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Small struct representing a 'prim' in the Hydra scene index.
std::vector< TfToken > TfTokenVector
Convenience types.