An HdRepr refers to a (single) topological representation of an rprim, and owns the draw item(s) that visually represent it. The draw items are populated by the rprim. The relevant compositional hierarchy is:
HdRprim | +–HdRepr(s) | +–HdDrawItem(s)
When multiple topological representations are required for an rprim, we use HdReprSelector to compose the individual representations.
Definition at line 156 of file repr.h.
void HdRepr::AddGeomSubsetDrawItem |
( |
std::unique_ptr< HdDrawItem > && |
item | ) |
|
|
inline |
HdRepr can hold geom subset draw items, which are unique in that they not created at the time the repr is created, but instead when populating the mesh topology of a mesh rprim. The number of geom subset draw items in a repr can change over time. We make some assumptions when using these geom subset related functions. We assume the geom subset draw items will only be added (or cleared) after all of the main draw items for a repr have been added. We also assume that the geom subset draw items for a repr desc are all added one after the other before moving onto the next repr desc. Thus the order of draw items in the _drawItems member might go something like (assuming two repr descs and three geom subsets in this example): [ main DI for desc 1, main DI for desc 2, GS1 DI for desc 1, GS2 DI for desc 1, GS3 DI for desc 1, GS1 DI for desc 2, GS2 DI for desc 2, GS3 DI for desc 2 ] It is also possible for there to exist a main draw item for a particular repr desc but no geom subsets for that repr desc, while having geom subsets exist for a different repr desc. Transfers ownership of a draw item to this repr. To be used only for geom subset draw items.
Definition at line 208 of file repr.h.