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

#include <visitor.h>

Public Types

enum  TriState { TRUE_STATE, FALSE_STATE, ANY_STATE }
 

Public Member Functions

 GusdVisitor ()
 
bool VisitPrims (const UsdPrim &prim, std::vector< UsdPrim > *results) const
 
TriState GetActiveState () const
 
void SetActiveState (TriState state)
 
TriState GetRefState () const
 
void SetRefState (TriState state)
 
bool GetVisitPurpose (const TfToken &purpose) const
 
void SetVisitPurpose (const TfToken &purpose, bool state)
 
bool GetRecurseUnmatched () const
 
void SetRecurseUnmatched (bool state)
 
bool GetRecurseChildren () const
 
void SetRecurseChildren (bool state)
 
int GetMinDepth () const
 
void SetMinDepth (int depth)
 
int GetMaxDepth () const
 
void SetMaxDepth (int depth)
 
bool VisitPrimType (const TfToken &typeName) const
 
void SetVisitPrimType (const TfToken &typeName, bool state)
 
bool GetVisitAnyClass () const
 
void SetVisitAnyClass (bool state)
 
bool GetVisitModels () const
 
void SetVisitModels (bool state)
 
bool GetVisitModelGroups () const
 
void SetVisitModelGroups (bool state)
 
const std::stringGetModelKindPattern () const
 
void SetModelKindPattern (const std::string &pat)
 
void SetVisitGeometryPrims (bool state)
 

Protected Member Functions

bool recursePrims (const UsdPrim &prim, bool active, TfToken purpose, int depth, std::vector< UsdPrim > *results) const
 

Protected Attributes

TriState m_activeState
 
TriState m_refState
 
std::map< TfToken, bool > m_purpose
 
bool m_recurseUnmatched
 
bool m_recurseChildren
 
int m_minDepth
 
int m_maxDepth
 
std::map< TfToken, bool > m_visitPrimType
 
bool m_visitAnyClass
 
bool m_visitModels
 
bool m_visitModelGroups
 
std::string m_modelKindPattern
 

Detailed Description

Deprecated:
This is being replaced with the more performant GusdUSD_Traverse. See GusdUSD_CustomTraverse for GusdUSD_Traverse implementation that roughly approximates the same configurations supported by this class.

Class for performing controlled recursion through usd prims. This includes the ability to exclude/include by visibility state, purpose, prim type, etc. This is the base algorithm that the import style used in pxh_usdRefsSOP is based on.

Definition at line 49 of file visitor.h.

Member Enumeration Documentation

Enumerator
TRUE_STATE 
FALSE_STATE 
ANY_STATE 

Definition at line 52 of file visitor.h.

Constructor & Destructor Documentation

GusdVisitor::GusdVisitor ( )

Member Function Documentation

TriState GusdVisitor::GetActiveState ( ) const
inline

Definition at line 65 of file visitor.h.

int GusdVisitor::GetMaxDepth ( ) const
inline

Definition at line 84 of file visitor.h.

int GusdVisitor::GetMinDepth ( ) const
inline

Definition at line 81 of file visitor.h.

const std::string& GusdVisitor::GetModelKindPattern ( ) const
inline

Definition at line 102 of file visitor.h.

bool GusdVisitor::GetRecurseChildren ( ) const
inline

Definition at line 78 of file visitor.h.

bool GusdVisitor::GetRecurseUnmatched ( ) const
inline

Definition at line 75 of file visitor.h.

TriState GusdVisitor::GetRefState ( ) const
inline

Definition at line 68 of file visitor.h.

bool GusdVisitor::GetVisitAnyClass ( ) const
inline

Definition at line 92 of file visitor.h.

bool GusdVisitor::GetVisitModelGroups ( ) const
inline

Definition at line 98 of file visitor.h.

bool GusdVisitor::GetVisitModels ( ) const
inline

Definition at line 95 of file visitor.h.

bool GusdVisitor::GetVisitPurpose ( const TfToken purpose) const
inline

Definition at line 138 of file visitor.h.

bool GusdVisitor::recursePrims ( const UsdPrim prim,
bool  active,
TfToken  purpose,
int  depth,
std::vector< UsdPrim > *  results 
) const
protected
void GusdVisitor::SetActiveState ( TriState  state)
inline

Definition at line 66 of file visitor.h.

void GusdVisitor::SetMaxDepth ( int  depth)
inline

Definition at line 85 of file visitor.h.

void GusdVisitor::SetMinDepth ( int  depth)
inline

Definition at line 82 of file visitor.h.

void GusdVisitor::SetModelKindPattern ( const std::string pat)
void GusdVisitor::SetRecurseChildren ( bool  state)
inline

Definition at line 79 of file visitor.h.

void GusdVisitor::SetRecurseUnmatched ( bool  state)
inline

Definition at line 76 of file visitor.h.

void GusdVisitor::SetRefState ( TriState  state)
inline

Definition at line 69 of file visitor.h.

void GusdVisitor::SetVisitAnyClass ( bool  state)
inline

Definition at line 93 of file visitor.h.

void GusdVisitor::SetVisitGeometryPrims ( bool  state)

Toggle visiting of geometry-containing prims. Just a convenience method that calls SetVisitPrimType() for each geometry-holding prim type.

void GusdVisitor::SetVisitModelGroups ( bool  state)
inline

Definition at line 99 of file visitor.h.

void GusdVisitor::SetVisitModels ( bool  state)
inline

Definition at line 96 of file visitor.h.

void GusdVisitor::SetVisitPrimType ( const TfToken typeName,
bool  state 
)
inline

Definition at line 89 of file visitor.h.

void GusdVisitor::SetVisitPurpose ( const TfToken purpose,
bool  state 
)
inline

Definition at line 72 of file visitor.h.

bool GusdVisitor::VisitPrims ( const UsdPrim prim,
std::vector< UsdPrim > *  results 
) const
bool GusdVisitor::VisitPrimType ( const TfToken typeName) const
inline

Definition at line 146 of file visitor.h.

Member Data Documentation

TriState GusdVisitor::m_activeState
protected

Definition at line 120 of file visitor.h.

int GusdVisitor::m_maxDepth
protected

Definition at line 127 of file visitor.h.

int GusdVisitor::m_minDepth
protected

Definition at line 126 of file visitor.h.

std::string GusdVisitor::m_modelKindPattern
protected

Definition at line 133 of file visitor.h.

std::map<TfToken,bool> GusdVisitor::m_purpose
protected

Definition at line 122 of file visitor.h.

bool GusdVisitor::m_recurseChildren
protected

Definition at line 125 of file visitor.h.

bool GusdVisitor::m_recurseUnmatched
protected

Definition at line 124 of file visitor.h.

TriState GusdVisitor::m_refState
protected

Definition at line 121 of file visitor.h.

bool GusdVisitor::m_visitAnyClass
protected

Definition at line 130 of file visitor.h.

bool GusdVisitor::m_visitModelGroups
protected

Definition at line 132 of file visitor.h.

bool GusdVisitor::m_visitModels
protected

Definition at line 131 of file visitor.h.

std::map<TfToken,bool> GusdVisitor::m_visitPrimType
protected

Definition at line 129 of file visitor.h.


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