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
148 static HdSceneIndexBaseRefPtr
150 HdSceneIndexBaseRefPtr
const& inputScene,
152 TfToken const& primTypeToCache);
167 static HdsiLocatorCachingSceneIndexRefPtr
168 New(HdSceneIndexBaseRefPtr
const& inputScene,
170 TfToken const& primTypeToCache);
184 HdSceneIndexBaseRefPtr
const& inputScene,
186 TfToken const& primTypeToCache);
203 HD_DECLARE_DATASOURCE(_DataSource);
206 HdDataSourceBaseHandle Get(
const TfToken &name)
override;
213 HdContainerDataSourceHandle
const& inputDataSource);
218 const HdContainerDataSourceHandle _inputDataSource;
223 HdDataSourceBaseHandle
227 HdContainerDataSourceHandle
const& inputDataSource)
const;
232 using _LocatorDataSourceMap =
240 const TfToken _primTypeToCache;
243 mutable _PrimCache _primDsCache;
244 mutable std::mutex _cacheMutex;
247PXR_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.
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)
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.
static HD_API HdSceneIndexBaseRefPtr AddDependencyForwardingAndCache(HdSceneIndexBaseRefPtr const &inputScene, HdDataSourceLocator const &locatorToCache, TfToken const &primTypeToCache)
Creates a new HdDependencyForwardingSceneIndex followed by a HdsiLocatorCachingSceneIndex.
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...
This is a space efficient container that mimics the TfHashMap API that uses a vector for storage when...
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.