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

#include <repr.h>

Public Member Functions

 HdReprSelector ()
 
 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
 
HD_API bool IsActiveRepr (size_t topologyIndex) const
 
HD_API bool AnyActiveRepr () const
 
HD_API HdReprSelector CompositeOver (const HdReprSelector &under) const
 
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 constGetText () const
 
HD_API TfToken constoperator[] (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)
 
template<class HashState >
void TfHashAppend (HashState &h, HdReprSelector const &rs)
 

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.

Constructor & Destructor Documentation

HdReprSelector::HdReprSelector ( )
inlineexplicit

Definition at line 51 of file repr.h.

HdReprSelector::HdReprSelector ( TfToken const token)
inlineexplicit

Definition at line 56 of file repr.h.

HdReprSelector::HdReprSelector ( TfToken const refined,
TfToken const unrefined 
)
inlineexplicit

Definition at line 61 of file repr.h.

HdReprSelector::HdReprSelector ( TfToken const refined,
TfToken const unrefined,
TfToken const points 
)
inlineexplicit

Definition at line 68 of file repr.h.

Member Function Documentation

HD_API bool HdReprSelector::AnyActiveRepr ( ) const

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

HD_API HdReprSelector 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 HdReprSelector::Contains ( const TfToken reprToken) const

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

HD_API char const* HdReprSelector::GetText ( ) const
HD_API size_t HdReprSelector::Hash ( ) const
HD_API bool HdReprSelector::IsActiveRepr ( size_t  topologyIndex) const

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

HD_API bool HdReprSelector::operator< ( const HdReprSelector rhs) const
HD_API bool HdReprSelector::operator== ( const HdReprSelector rhs) const
HD_API TfToken const& HdReprSelector::operator[] ( size_t  topologyIndex) const

Friends And Related Function Documentation

HD_API friend std::ostream& operator<< ( std::ostream &  stream,
HdReprSelector const t 
)
friend
template<class HashState >
void TfHashAppend ( HashState &  h,
HdReprSelector const rs 
)
friend

Definition at line 130 of file repr.h.

Member Data Documentation

const size_t HdReprSelector::MAX_TOPOLOGY_REPRS = 3
static

Currenly support upto 3 topology tokens.

Definition at line 77 of file repr.h.


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