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

Describes one or more authored display representations for an rprim. More...

Public Member Functions

 HdReprSelector (TfToken const &token)
 
 HdReprSelector (TfToken const &refined, TfToken const &unrefined)
 
 HdReprSelector (TfToken const &refined, TfToken const &unrefined, TfToken const &points)
 
HD_API bool Contains (const TfToken &reprToken) const
 Returns true if the passed in reprToken is in the set of tokens for any topology index. More...
 
HD_API bool IsActiveRepr (size_t topologyIndex) const
 Returns true if the topology token at an index is active, i.e., neither empty nor disabled. More...
 
HD_API bool AnyActiveRepr () const
 Returns true if any of the topology tokens is valid, i.e., neither empty nor disabled. More...
 
HD_API HdReprSelector CompositeOver (const HdReprSelector &under) const
 Returns a selector that is the composite of this selector 'over' the passed in selector. More...
 
HD_API bool operator== (const HdReprSelector &rhs) const
 
HD_API bool operator!= (const HdReprSelector &rhs) const
 
HD_API bool operator< (const HdReprSelector &rhs) const
 
HD_API size_t Hash () const
 
HD_API char const * GetText () const
 
HD_API TfToken const & operator[] (size_t topologyIndex) const
 

Static Public Attributes

static const size_t MAX_TOPOLOGY_REPRS = 3
 Currenly support upto 3 topology tokens. More...
 

Friends

HD_API friend std::ostream & operator<< (std::ostream &stream, HdReprSelector const &t)
 

Detailed Description

Describes one or more authored display representations for an rprim.

Display opinions are separated by the topology index they represent. This allows the application to specify one or more topological representations for a given HdRprim. For some visualizations, an application may choose to provide an opinion for the display of the refined surface, the unrefined hull and the points separately from the rprim's authored opinions. HdReprSelector allows these opinions to compose/merge into a final composite representation to be used for rendering.

Definition at line 48 of file repr.h.

Member Function Documentation

HD_API bool AnyActiveRepr ( ) const

Returns true if any of the topology tokens is valid, i.e., neither empty nor disabled.

HD_API HdReprSelector CompositeOver ( const HdReprSelector under) const

Returns a selector that is the composite of this selector 'over' the passed in selector.

For each token that IsEmpty in this selector return the corresponding token in the passed in selector. Effectively this performs a merge operation where this selector wins for each topological index it has an opinion on.

HD_API bool Contains ( const TfToken reprToken) const

Returns true if the passed in reprToken is in the set of tokens for any topology index.

HD_API bool IsActiveRepr ( size_t  topologyIndex) const

Returns true if the topology token at an index is active, i.e., neither empty nor disabled.

Member Data Documentation

const size_t MAX_TOPOLOGY_REPRS = 3
static

Currenly support upto 3 topology tokens.

Definition at line 76 of file repr.h.


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