An HdRepr refers to a (single) topological representation of an rprim, and owns the draw item(s) that visually represent it.
More...
#include <repr.h>
|
const DrawItemUniquePtrVector & | GetDrawItems () const |
| Returns the draw items for this representation.
|
|
void | AddDrawItem (std::unique_ptr< HdDrawItem > &&item) |
| Transfers ownership of a draw item to this repr.
|
|
HdDrawItem * | GetDrawItem (size_t index) const |
| Returns the draw item at the requested index.
|
|
void | AddGeomSubsetDrawItem (std::unique_ptr< HdDrawItem > &&item) |
| 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.
|
|
HdDrawItem * | GetDrawItemForGeomSubset (size_t reprDescIndex, size_t numGeomSubsets, size_t geomSubsetIndex) const |
| Utility similar to GetDrawItem for getting geom subset draw items.
|
|
void | ClearGeomSubsetDrawItems () |
| Removes all of the geom subset draw items from the repr.
|
|
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 139 of file repr.h.
◆ DrawItemUniquePtr
using DrawItemUniquePtr = std::unique_ptr<HdDrawItem> |
◆ DrawItemUniquePtrVector
using DrawItemUniquePtrVector = std::vector<DrawItemUniquePtr> |
◆ AddDrawItem()
void AddDrawItem |
( |
std::unique_ptr< HdDrawItem > && |
item | ) |
|
|
inline |
Transfers ownership of a draw item to this repr.
Do not use for adding geom subset draw items.
Definition at line 157 of file repr.h.
◆ AddGeomSubsetDrawItem()
void 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 191 of file repr.h.
◆ ClearGeomSubsetDrawItems()
void ClearGeomSubsetDrawItems |
( |
| ) |
|
|
inline |
Removes all of the geom subset draw items from the repr.
Definition at line 203 of file repr.h.
◆ GetDrawItem()
Returns the draw item at the requested index.
Note that the pointer returned is owned by this object and must not be deleted.
Definition at line 167 of file repr.h.
◆ GetDrawItemForGeomSubset()
HdDrawItem * GetDrawItemForGeomSubset |
( |
size_t |
reprDescIndex, |
|
|
size_t |
numGeomSubsets, |
|
|
size_t |
geomSubsetIndex |
|
) |
| const |
|
inline |
Utility similar to GetDrawItem for getting geom subset draw items.
Definition at line 196 of file repr.h.
◆ GetDrawItems()
const DrawItemUniquePtrVector & GetDrawItems |
( |
| ) |
const |
|
inline |
Returns the draw items for this representation.
Definition at line 151 of file repr.h.
The documentation for this class was generated from the following file: