24 #ifndef PXR_IMAGING_HD_REPR_H
25 #define PXR_IMAGING_HD_REPR_H
64 : refinedToken(refined)
65 , unrefinedToken(unrefined)
72 : refinedToken(refined)
73 , unrefinedToken(unrefined)
74 , pointsToken(points) { }
128 template <
class HashState>
131 h.Append(rs.refinedToken, rs.unrefinedToken, rs.pointsToken);
175 _drawItems.insert(_drawItems.begin() + _geomSubsetsStart,
185 return _drawItems[
index].get();
209 _drawItems.push_back(std::move(item));
214 size_t numGeomSubsets,
size_t geomSubsetIndex)
const {
215 return _drawItems[_geomSubsetsStart + reprDescIndex * numGeomSubsets +
216 geomSubsetIndex].get();
222 _drawItems.begin() + _geomSubsetsStart, _drawItems.end());
236 size_t _geomSubsetsStart;
242 #endif //PXR_IMAGING_HD_REPR_H
void ClearGeomSubsetDrawItems()
Removes all of the geom subset draw items from the repr.
GLdouble GLdouble GLint GLint const GLdouble * points
std::unique_ptr< HdDrawItem > DrawItemUniquePtr
HD_API bool operator<(const HdReprSelector &rhs) const
HD_API friend std::ostream & operator<<(std::ostream &stream, HdReprSelector const &t)
HD_API bool operator==(const HdReprSelector &rhs) const
friend void TfHashAppend(HashState &h, HdReprSelector const &rs)
HD_API TfToken const & operator[](size_t topologyIndex) const
HdDrawItem * GetDrawItem(size_t index) const
HdReprSelector(TfToken const &token)
HD_API size_t Hash() const
HD_API bool operator!=(const HdReprSelector &rhs) const
static const size_t MAX_TOPOLOGY_REPRS
Currenly support upto 3 topology tokens.
HD_API bool Contains(const TfToken &reprToken) const
HdReprSelector(TfToken const &refined, TfToken const &unrefined, TfToken const &points)
HdDrawItem * GetDrawItemForGeomSubset(size_t reprDescIndex, size_t numGeomSubsets, size_t geomSubsetIndex) const
Utility similar to GetDrawItem for getting geom subset draw items.
HD_API char const * GetText() const
GLfloat GLfloat GLfloat GLfloat h
HD_API bool AnyActiveRepr() const
HD_API bool IsActiveRepr(size_t topologyIndex) const
std::vector< DrawItemUniquePtr > DrawItemUniquePtrVector
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HD_API HdReprSelector CompositeOver(const HdReprSelector &under) const
#define PXR_NAMESPACE_CLOSE_SCOPE
HdReprSelector(TfToken const &refined, TfToken const &unrefined)
const DrawItemUniquePtrVector & GetDrawItems() const
Returns the draw items for this representation.
void AddDrawItem(std::unique_ptr< HdDrawItem > &&item)
void AddGeomSubsetDrawItem(std::unique_ptr< HdDrawItem > &&item)