7 #ifndef PXR_USD_IMAGING_USD_IMAGING_COLLECTION_CACHE_H
8 #define PXR_USD_IMAGING_USD_IMAGING_COLLECTION_CACHE_H
16 #include <tbb/concurrent_unordered_map.h>
17 #include <tbb/concurrent_queue.h>
19 #include <unordered_map>
98 std::unordered_map<Query, TfToken, Query::Hash> _idForQuery;
99 std::unordered_map<TfToken, Query, TfToken::HashFunctor> _queryForId;
100 std::unordered_map<SdfPath, TfToken, SdfPath::Hash> _idForPath;
101 std::unordered_map<Query, SdfPathSet, Query::Hash> _pathsForQuery;
104 _MarkCollectionContentDirty(
116 #endif // PXR_USD_IMAGING_USD_IMAGING_COLLECTION_CACHE_H
USDIMAGING_API bool UpdateCollection(UsdCollectionAPI const &collection)
GLsizei const GLchar *const * path
Represents a flattened view of a collection. For more information about collections, please see UsdCollectionAPI as a way to encode and retrieve a collection from scene description. A UsdCollectionMembershipQuery object can be used to answer queries about membership of paths in the collection efficiently.
UsdStagePtr UsdStageWeakPtr
USDIMAGING_API size_t RemoveCollection(UsdStageWeakPtr const &stage, SdfPath const &path)
Returns the hash of the removed collection, or 0 if no collection existed.
UsdImaging_CollectionCache & operator=(const UsdImaging_CollectionCache &)=delete
std::set< class SdfPath > SdfPathSet
A set of SdfPaths.
USDIMAGING_API void ClearDirtyPaths()
Clears the internal dirty flags.
UsdImaging_CollectionCache()=default
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
USDIMAGING_API TfToken GetIdForCollection(UsdCollectionAPI const &collection)
Return the cached entry for the given collection.
UsdCollectionAPI::MembershipQuery Query
Query is the MembershipQuery computed from a collection's state.
#define PXR_NAMESPACE_CLOSE_SCOPE
USDIMAGING_API VtArray< TfToken > ComputeCollectionsContainingPath(SdfPath const &path) const
Return a list of identifiers of all collections that contain.
USDIMAGING_API SdfPathSet const & GetDirtyPaths() const