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

#include <drawItemInstance.h>

Public Member Functions

HDST_API HdStDrawItemInstance (HdStDrawItem const *drawItem)
HDST_API ~HdStDrawItemInstance ()
HDST_API void SetVisible (bool visible)
 Set visibility state. More...
bool IsVisible () const
 Query visibility state. More...
HDST_API void SetBatchIndex (size_t batchIndex)
size_t GetBatchIndex () const
 Query batch index. More...
void SetBatch (HdSt_DrawBatch *batch)
HdStDrawItem constGetDrawItem () 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 47 of file drawItemInstance.h.

Constructor & Destructor Documentation

HDST_API HdStDrawItemInstance::HdStDrawItemInstance ( HdStDrawItem const drawItem)
HDST_API HdStDrawItemInstance::~HdStDrawItemInstance ( )

Member Function Documentation

size_t HdStDrawItemInstance::GetBatchIndex ( ) const

Query batch index.

Definition at line 68 of file drawItemInstance.h.

HdStDrawItem const* HdStDrawItemInstance::GetDrawItem ( ) const

Return a const pointer to draw item.

Definition at line 77 of file drawItemInstance.h.

bool HdStDrawItemInstance::IsVisible ( ) const

Query visibility state.

Definition at line 60 of file drawItemInstance.h.

void HdStDrawItemInstance::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 HdStDrawItemInstance::SetBatchIndex ( size_t  batchIndex)

Set index into batch list. Can be used by batch during DrawItemInstanceChanged callback

HDST_API void HdStDrawItemInstance::SetVisible ( bool  visible)

Set visibility state.

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