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

#include <resolver.h>

Classes

struct  Position
 

Public Member Functions

USD_API Usd_Resolver (const PcpPrimIndex *index, bool skipEmptyNodes=true)
 
bool IsValid () const
 Returns true when there is a current Node and Layer. More...
 
USD_API bool NextLayer ()
 
USD_API void NextNode ()
 
USD_API PcpNodeRef GetNode () const
 
USD_API const SdfLayerRefPtrGetLayer () const
 
USD_API const SdfPathGetLocalPath () const
 Returns a translated path for the current PcpNode and Layer. More...
 
SdfPath GetLocalPath (TfToken const &propName) const
 
USD_API const PcpPrimIndexGetPrimIndex () const
 
USD_API Position GetPosition () const
 

Detailed Description

Given a PcpPrimIndex, this class facilitates value resolution by providing a mechanism for walking the composition structure in strong-to-weak order.

Definition at line 46 of file resolver.h.

Constructor & Destructor Documentation

USD_API Usd_Resolver::Usd_Resolver ( const PcpPrimIndex index,
bool  skipEmptyNodes = true 
)
explicit

Constructs a resolver with the given index. The index is held for the duration of the resolver's lifetime. If skipEmptyNodes is true, the resolver will skip over nodes that provide no opinions about the prim represented by index. Otherwise, the resolver will visit all non-inert nodes in the index.

Member Function Documentation

USD_API const SdfLayerRefPtr& Usd_Resolver::GetLayer ( ) const

Returns the current layer for the current PcpNode.

PERFORMANCE: This returns a const-ref to avoid ref-count bumps during resolution. This is safe under the assumption that no changes will occur during resolution and that the lifetime of this object will be short.

USD_API const SdfPath& Usd_Resolver::GetLocalPath ( ) const

Returns a translated path for the current PcpNode and Layer.

SdfPath Usd_Resolver::GetLocalPath ( TfToken const propName) const
inline

Definition at line 95 of file resolver.h.

USD_API PcpNodeRef Usd_Resolver::GetNode ( ) const

Returns the current PCP node.

This is useful for coarse grained resolution tasks, however individual layers must be inspected in the common case.

USD_API Position Usd_Resolver::GetPosition ( ) const

Returns a Position object representing the current node and layer in the prim index.

USD_API const PcpPrimIndex* Usd_Resolver::GetPrimIndex ( ) const

Returns the PcpPrimIndex.

This value is initialized when the resolver is constructed and does not change as a result of calling NextLayer() or NextNode().

bool Usd_Resolver::IsValid ( ) const
inline

Returns true when there is a current Node and Layer.

Definition at line 58 of file resolver.h.

USD_API bool Usd_Resolver::NextLayer ( )

Advances the resolver to the next weaker Layer in the layer stack, if the current LayerStack has no more layers, the resolver will be advanced to the next weaker PcpNode. If no layers are available, the resolver will be marked as invalid. Returns true iff the resolver advanced to another node or was or became invalid.

USD_API void Usd_Resolver::NextNode ( )

Skips all pending layers in the current LayerStack and jumps to the next weaker PcpNode. When no more nodes are available, the resolver will be marked as invalid.


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