![]() |
A container to store instance state for a drawitem. More...
Public Member Functions | |
| HDST_API | HdStDrawItemInstance (HdStDrawItem const *drawItem) |
| HDST_API void | SetVisible (bool visible) |
| Set visibility state. More... | |
| bool | IsVisible () const |
| Query visibility state. More... | |
| HDST_API void | SetBatchIndex (size_t batchIndex) |
| Set index into batch list. More... | |
| size_t | GetBatchIndex () const |
| Query batch index. More... | |
| void | SetBatch (HdSt_DrawBatch *batch) |
| Set the batch that will receive the DrawItemInstanceChanged callback when visibility is updated. More... | |
| HdStDrawItem const * | GetDrawItem () const |
| Return a const pointer to draw item. More... | |
A container to store instance state for a drawitem.
During culling, the visibility state will be set. If the instance has a batch, the batch will get a DrawItemInstanceChanged callback.
The Batch is responsible for calling SetBatch and SetBatchIndex when adding / appending the instance. If the batch does not require the DrawItemInstanceChanged callback, then this step can be skipped
Definition at line 47 of file drawItemInstance.h.
|
inline |
Query batch index.
Definition at line 68 of file drawItemInstance.h.
|
inline |
Return a const pointer to draw item.
Definition at line 77 of file drawItemInstance.h.
|
inline |
Query visibility state.
Definition at line 60 of file drawItemInstance.h.
| void SetBatch | ( | HdSt_DrawBatch * | batch | ) |
Set the batch that will receive the DrawItemInstanceChanged callback when visibility is updated.
Setting batch to NULL will disable this callback.
| HDST_API void SetBatchIndex | ( | size_t | batchIndex | ) |
Set index into batch list.
Can be used by batch during DrawItemInstanceChanged callback
| HDST_API void SetVisible | ( | bool | visible | ) |
Set visibility state.