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

#include <labelsQuery.h>

Public Member Functions

 UsdSemanticsLabelsQuery (const UsdSemanticsLabelsQuery &)=delete
 
UsdSemanticsLabelsQueryoperator= (const UsdSemanticsLabelsQuery &)=delete
 
USDSEMANTICS_API UsdSemanticsLabelsQuery (const TfToken &taxonomy, UsdTimeCode timeCode)
 
USDSEMANTICS_API UsdSemanticsLabelsQuery (const TfToken &taxonomy, const GfInterval &interval)
 
USDSEMANTICS_API VtTokenArray ComputeUniqueDirectLabels (const UsdPrim &prim) const
 
USDSEMANTICS_API VtTokenArray ComputeUniqueInheritedLabels (const UsdPrim &prim) const
 
USDSEMANTICS_API bool HasDirectLabel (const UsdPrim &prim, const TfToken &label) const
 
USDSEMANTICS_API bool HasInheritedLabel (const UsdPrim &prim, const TfToken &label) const
 
const std::variant< GfInterval,
UsdTimeCode > & 
GetTime () const &
 Returns the time used by this query when computing a prim's labels. More...
 
std::variant< GfInterval,
UsdTimeCode
GetTime ()&&
 Returns the time used by this query when computing a prim's labels. More...
 
const TfTokenGetTaxonomy () const &
 Returns the taxonomy used by this query when computing a prim's labels. More...
 
TfToken GetTaxonomy ()&&
 Returns the taxonomy used by this query when computing a prim's labels. More...
 

Detailed Description

The UsdSemanticsLabelsQuery can be used to query a prim's labels for a specified taxonomy and time from the UsdSemanticsLabelsAPI. Time may be an individual time code or an interval.

This utility requires that all prims are on the same stage.

The query caches certain reads and computations and should be discarded when the state of the stage changes. Queries are thread safe.

Definition at line 33 of file labelsQuery.h.

Constructor & Destructor Documentation

UsdSemanticsLabelsQuery::UsdSemanticsLabelsQuery ( const UsdSemanticsLabelsQuery )
delete
USDSEMANTICS_API UsdSemanticsLabelsQuery::UsdSemanticsLabelsQuery ( const TfToken taxonomy,
UsdTimeCode  timeCode 
)

Constructs a query for a taxonomy at a single timeCode.

Requires that the taxonomy must not be empty.

USDSEMANTICS_API UsdSemanticsLabelsQuery::UsdSemanticsLabelsQuery ( const TfToken taxonomy,
const GfInterval interval 
)

Construct a query for a taxonomy over an interval.

Requires that neither the interval nor taxonomy to be empty.

Warning
Finite minimum values of the interval will return the same result regardless of closed or open state due to held interpolation semantics and Zeno's paradox.

Member Function Documentation

USDSEMANTICS_API VtTokenArray UsdSemanticsLabelsQuery::ComputeUniqueDirectLabels ( const UsdPrim prim) const

Computes the values for semantics:labels:<taxonomy> directly applied to this prim. If this query's specified time is a time code, returns the values at that time, otherwise, computes the union of values for the interval.

The results are sorted as if by std::sort

If no time samples are authored, the default and fallback values will be queried.

See Also
UsdSemanticsLabelsQuery::ComputeUniqueInheritedLabels
USDSEMANTICS_API VtTokenArray UsdSemanticsLabelsQuery::ComputeUniqueInheritedLabels ( const UsdPrim prim) const

Computes the values for semantics:labels:<taxonomy> including any labels inherited from ancestors. If this query's specified time is a time code, returns the values at that time, otherwise, computes the union of values for the interval.

The results are sorted as if by std::sort

If no time samples are authored, the default and fallback values of the prim and every ancestor will be queried.

See Also
UsdSemanticsLabelsQuery::ComputeUniqueDirectLabels
const TfToken& UsdSemanticsLabelsQuery::GetTaxonomy ( ) const
inline

Returns the taxonomy used by this query when computing a prim's labels.

Definition at line 107 of file labelsQuery.h.

TfToken UsdSemanticsLabelsQuery::GetTaxonomy ( )
inline

Returns the taxonomy used by this query when computing a prim's labels.

Definition at line 110 of file labelsQuery.h.

const std::variant<GfInterval, UsdTimeCode>& UsdSemanticsLabelsQuery::GetTime ( ) const
inline

Returns the time used by this query when computing a prim's labels.

Definition at line 99 of file labelsQuery.h.

std::variant<GfInterval, UsdTimeCode> UsdSemanticsLabelsQuery::GetTime ( )
inline

Returns the time used by this query when computing a prim's labels.

Definition at line 103 of file labelsQuery.h.

USDSEMANTICS_API bool UsdSemanticsLabelsQuery::HasDirectLabel ( const UsdPrim prim,
const TfToken label 
) const

Return true if a label has been specified directly on this prim for this query's taxonomy and time

See Also
UsdSemanticsLabelsQuery::HasInheritedLabel
USDSEMANTICS_API bool UsdSemanticsLabelsQuery::HasInheritedLabel ( const UsdPrim prim,
const TfToken label 
) const

Return true if a label has been specified for a prim or its ancestors for this query's taxonomy and time

See Also
UsdSemanticsLabelsQuery::HasDirectLabel
UsdSemanticsLabelsQuery& UsdSemanticsLabelsQuery::operator= ( const UsdSemanticsLabelsQuery )
delete

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