Loading...
Searching...
No Matches
HdStDrawItemInstance Class Reference

A container to store instance state for a drawitem. More...

#include <drawItemInstance.h>

Public Member Functions

HDST_API HdStDrawItemInstance (HdStDrawItem const *drawItem)
 
HDST_API void SetVisible (bool visible)
 Set visibility state.
 
bool IsVisible () const
 Query visibility state.
 
HDST_API void SetBatchIndex (size_t batchIndex)
 Set index into batch list.
 
size_t GetBatchIndex () const
 Query batch index.
 
void SetBatch (HdSt_DrawBatch *batch)
 Set the batch that will receive the DrawItemInstanceChanged callback when visibility is updated.
 
HdStDrawItem const * GetDrawItem () const
 Return a const pointer to draw item.
 

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

Member Function Documentation

◆ GetBatchIndex()

size_t GetBatchIndex ( ) const
inline

Query batch index.

Definition at line 68 of file drawItemInstance.h.

◆ GetDrawItem()

HdStDrawItem const * GetDrawItem ( ) const
inline

Return a const pointer to draw item.

Definition at line 77 of file drawItemInstance.h.

◆ IsVisible()

bool IsVisible ( ) const
inline

Query visibility state.

Definition at line 60 of file drawItemInstance.h.

◆ SetBatch()

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.

◆ SetBatchIndex()

HDST_API void SetBatchIndex ( size_t  batchIndex)

Set index into batch list.

Can be used by batch during DrawItemInstanceChanged callback

◆ SetVisible()

HDST_API void SetVisible ( bool  visible)

Set visibility state.


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