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

#include <drawItem.h>

+ Inheritance diagram for HdStDrawItem:

Public Member Functions

 HF_MALLOC_TAG_NEW ("new HdStDrawItem")
 
HDST_API HdStDrawItem (HdRprimSharedData const *sharedData)
 
HDST_API ~HdStDrawItem () override
 
bool HasInstancer () const
 Returns true if the drawItem has an instancer. More...
 
int GetInstancePrimvarNumLevels () const
 Returns the number of nested levels of instance primvars. More...
 
HdBufferArrayRangeSharedPtr const & GetInstancePrimvarRange (int level) const
 
HdBufferArrayRangeSharedPtr const & GetInstanceIndexRange () const
 Returns instance-index indirection BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetConstantPrimvarRange () const
 Returns constant primvar BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetElementPrimvarRange () const
 Returns element primvar BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetVertexPrimvarRange () const
 Returns vertex primvar BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetVaryingPrimvarRange () const
 Returns varying primvar BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetFaceVaryingPrimvarRange () const
 Returns face varying primvar BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetTopologyRange () const
 Returns topology BAR. More...
 
HdBufferArrayRangeSharedPtr const & GetTopologyVisibilityRange () const
 Returns topological visibility BAR (e.g. per-face, per-point, etc.) More...
 
TopologyToPrimvarVector const & GetFvarTopologyToPrimvarVector () const
 Returns mapping from refined fvar channels to named primvar. More...
 
void SetGeometricShader (HdSt_GeometricShaderSharedPtr const &shader)
 
HdSt_GeometricShaderSharedPtr
const & 
GetGeometricShader () const
 
HdSt_MaterialNetworkShaderSharedPtr
const & 
GetMaterialNetworkShader () const
 
void SetMaterialNetworkShader (HdSt_MaterialNetworkShaderSharedPtr const &shader)
 
bool GetMaterialIsFinal () const
 
void SetMaterialIsFinal (bool isFinal)
 
HDST_API bool IntersectsViewVolume (GfMatrix4d const &viewProjMatrix) const
 
HDST_API size_t GetBufferArraysHash () const
 
HDST_API size_t GetElementOffsetsHash () const
 
- Public Member Functions inherited from HdDrawItem
 HF_MALLOC_TAG_NEW ("new HdDrawItem")
 
HD_API HdDrawItem (HdRprimSharedData const *sharedData)
 
virtual HD_API ~HdDrawItem ()
 
SdfPath const & GetRprimID () const
 
GfBBox3d const & GetBounds () const
 
GfRange3d const & GetExtent () const
 
GfMatrix4d const & GetMatrix () const
 
HdDrawingCoordGetDrawingCoord ()
 
bool GetVisible () const
 Returns the authored visibility, expressed by the delegate. More...
 
TfToken const & GetMaterialTag () const
 
void SetMaterialTag (TfToken const &materialTag)
 

Additional Inherited Members

- Protected Member Functions inherited from HdDrawItem
HdDrawingCoord const & _GetDrawingCoord () const
 Returns the drawingCoord. More...
 
HdRprimSharedData const * _GetSharedData () const
 Returns the shared data. More...
 

Detailed Description

Definition at line 40 of file drawItem.h.

Constructor & Destructor Documentation

HDST_API HdStDrawItem::HdStDrawItem ( HdRprimSharedData const *  sharedData)
HDST_API HdStDrawItem::~HdStDrawItem ( )
override

Member Function Documentation

HDST_API size_t HdStDrawItem::GetBufferArraysHash ( ) const

Returns the hash of the versions of underlying buffers. When the hash changes, it means the drawing coord might have been reassigned, so any drawing coord caching buffer (e.g. indirect dispatch buffer) has to be rebuilt at the moment. Note that this value is a hash, not sequential.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetConstantPrimvarRange ( ) const
inline

Returns constant primvar BAR.

Definition at line 87 of file drawItem.h.

HDST_API size_t HdStDrawItem::GetElementOffsetsHash ( ) const

Returns the hash of the element offsets of the underlying BARs. When the hash changes, it means that any drawing coord caching buffer (e.g. the indirect dispatch buffer) has to be rebuilt. Note that this value is a hash, not sequential.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetElementPrimvarRange ( ) const
inline

Returns element primvar BAR.

Definition at line 93 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetFaceVaryingPrimvarRange ( ) const
inline

Returns face varying primvar BAR.

Definition at line 111 of file drawItem.h.

TopologyToPrimvarVector const& HdStDrawItem::GetFvarTopologyToPrimvarVector ( ) const
inline

Returns mapping from refined fvar channels to named primvar.

Definition at line 129 of file drawItem.h.

HdSt_GeometricShaderSharedPtr const& HdStDrawItem::GetGeometricShader ( ) const
inline

Definition at line 137 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetInstanceIndexRange ( ) const
inline

Returns instance-index indirection BAR.

Definition at line 81 of file drawItem.h.

int HdStDrawItem::GetInstancePrimvarNumLevels ( ) const
inline

Returns the number of nested levels of instance primvars.

Definition at line 58 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetInstancePrimvarRange ( int  level) const
inline

Returns a BufferArrayRange of instance primvars at level the level is assigned to nested instancers in a bottom-up manner.

example: (numLevels = 2)

instancerA         (level = 1)
  |
  +-- instancerB   (level = 0)
        |
        +-- mesh_prototype

Definition at line 75 of file drawItem.h.

bool HdStDrawItem::GetMaterialIsFinal ( ) const
inline

Definition at line 151 of file drawItem.h.

HdSt_MaterialNetworkShaderSharedPtr const& HdStDrawItem::GetMaterialNetworkShader ( ) const
inline

Definition at line 142 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetTopologyRange ( ) const
inline

Returns topology BAR.

Definition at line 117 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetTopologyVisibilityRange ( ) const
inline

Returns topological visibility BAR (e.g. per-face, per-point, etc.)

Definition at line 123 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetVaryingPrimvarRange ( ) const
inline

Returns varying primvar BAR.

Definition at line 105 of file drawItem.h.

HdBufferArrayRangeSharedPtr const& HdStDrawItem::GetVertexPrimvarRange ( ) const
inline

Returns vertex primvar BAR.

Definition at line 99 of file drawItem.h.

bool HdStDrawItem::HasInstancer ( ) const
inline

Returns true if the drawItem has an instancer.

Definition at line 52 of file drawItem.h.

HdStDrawItem::HF_MALLOC_TAG_NEW ( "new HdStDrawItem )
HDST_API bool HdStDrawItem::IntersectsViewVolume ( GfMatrix4d const &  viewProjMatrix) const

Tests intersection with the specified view projection matrix. Returns true if this drawItem is in the frustum.

XXX: Currently if this drawitem uses instancing, always returns true.

void HdStDrawItem::SetGeometricShader ( HdSt_GeometricShaderSharedPtr const &  shader)
inline

Definition at line 133 of file drawItem.h.

void HdStDrawItem::SetMaterialIsFinal ( bool  isFinal)
inline

Definition at line 155 of file drawItem.h.

void HdStDrawItem::SetMaterialNetworkShader ( HdSt_MaterialNetworkShaderSharedPtr const &  shader)
inline

Definition at line 146 of file drawItem.h.


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