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

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...
 

Detailed Description

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 48 of file drawItemInstance.h.

Member Function Documentation

size_t GetBatchIndex ( ) const
inline

Query batch index.

Definition at line 69 of file drawItemInstance.h.

HdStDrawItem const* GetDrawItem ( ) const
inline

Return a const pointer to draw item.

Definition at line 78 of file drawItemInstance.h.

bool IsVisible ( ) const
inline

Query visibility state.

Definition at line 61 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.


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