HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdImaging_CollectionCache Class Reference

#include <collectionCache.h>

+ Inheritance diagram for UsdImaging_CollectionCache:

Public Types

typedef
UsdCollectionAPI::MembershipQuery 
Query
 Query is the MembershipQuery computed from a collection's state. More...
 

Public Member Functions

TfToken UpdateCollection (UsdCollectionAPI const &collection)
 
void RemoveCollection (UsdCollectionAPI const &collection)
 
TfToken GetIdForCollection (UsdCollectionAPI const &collection)
 Return the cached entry for the given collection. More...
 
VtArray< TfTokenComputeCollectionsContainingPath (SdfPath const &path) const
 Return a list of identifiers of all collections that contain. More...
 

Detailed Description

UsdImaging_CollectionCache provides a cache of Usd collections discovered in the scene. It associates the collection paths (UsdCollectionAPI::GetCollectionPath) with the computed membership query (UsdCollectionAPI::ComputeMembershipQuery).

For efficiency, it groups collections into equivalence classes based on the computed query. Collections that yield equivalent queries are merged. Each unique query is assigned an identifier token.

This cache is used to track the collections used for linking UsdLux lights/shadows/filters to geometry.

As an optimization, the query that includes everything is treated as a special case and given the empty id, TfToken().

Definition at line 58 of file collectionCache.h.

Member Typedef Documentation

Query is the MembershipQuery computed from a collection's state.

Definition at line 61 of file collectionCache.h.

Member Function Documentation

VtArray<TfToken> UsdImaging_CollectionCache::ComputeCollectionsContainingPath ( SdfPath const path) const

Return a list of identifiers of all collections that contain.

TfToken UsdImaging_CollectionCache::GetIdForCollection ( UsdCollectionAPI const collection)

Return the cached entry for the given collection.

void UsdImaging_CollectionCache::RemoveCollection ( UsdCollectionAPI const collection)

Remove any cached entry for the given collection. Does nothing if no cache entry exists.

TfToken UsdImaging_CollectionCache::UpdateCollection ( UsdCollectionAPI const collection)

Computes the membership query from the current state of the given collection, and establishes a cache entry. If a prior entry existed for the collection at this path, it is removed first.


The documentation for this class was generated from the following file: