This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HdMesh Class Reference

Hydra Schema for a subdivision surface or poly-mesh object. More...

#include <mesh.h>

+ Inheritance diagram for HdMesh:

Public Member Functions

bool IsDoubleSided (HdSceneDelegate *delegate) const
 Render State.
 
HdCullStyle GetCullStyle (HdSceneDelegate *delegate) const
 
VtValue GetShadingStyle (HdSceneDelegate *delegate) const
 
HdMeshTopology GetMeshTopology (HdSceneDelegate *delegate) const
 Topological accessors via the scene delegate.
 
HdDisplayStyle GetDisplayStyle (HdSceneDelegate *delegate) const
 
PxOsdSubdivTags GetSubdivTags (HdSceneDelegate *delegate) const
 
virtual HdMeshTopologySharedPtr GetTopology () const
 Topology getter.
 
VtValue GetPoints (HdSceneDelegate *delegate) const
 Primvars Accessors.
 
VtValue GetNormals (HdSceneDelegate *delegate) const
 
HD_API TfTokenVector const & GetBuiltinPrimvarNames () const override
 Returns the names of built-in primvars, i.e.
 
- Public Member Functions inherited from HdRprim
HD_API HdRprim (SdfPath const &id)
 
HD_API const HdRepr::DrawItemUniquePtrVector & GetDrawItems (TfToken const &reprToken) const
 Returns the draw items for the requested repr token, if any.
 
virtual HD_API void Finalize (HdRenderParam *renderParam)
 Finalizes object resources.
 
SdfPath const & GetId () const
 Returns the identifier of this Rprim.
 
int32_t GetPrimId () const
 Return the unique instance id.
 
HD_API void SetPrimId (int32_t primId)
 Set the unique instance id.
 
SdfPath const & GetInstancerId () const
 Returns the identifier of the instancer (if any) for this Rprim.
 
SdfPath const & GetMaterialId () const
 Returns the path of the material to which this Rprim is bound.
 
HD_API void SetMaterialId (SdfPath const &materialId)
 Sets a new material binding to be used by this rprim.
 
HdReprSelector const & GetReprSelector () const
 
TfToken const & GetRenderTag () const
 
TfToken GetRenderTag (HdSceneDelegate *delegate) const
 Returns the render tag associated to this rprim.
 
GfRange3d GetExtent (HdSceneDelegate *delegate) const
 Returns the bounds of the rprim in local, untransformed space.
 
HdPrimvarDescriptorVector GetPrimvarDescriptors (HdSceneDelegate *delegate, HdInterpolation interpolation) const
 Primvar Query.
 
VtValue GetPrimvar (HdSceneDelegate *delegate, const TfToken &name) const
 
VtValue GetIndexedPrimvar (HdSceneDelegate *delegate, const TfToken &name, VtIntArray *indices) const
 
HD_API VtMatrix4dArray GetInstancerTransforms (HdSceneDelegate *delegate)
 
HD_API bool IsDirty (HdChangeTracker &changeTracker) const
 Returns true if any dirty flags are set for this rprim.
 
bool IsVisible () const
 Is the prim itself visible.
 
HD_API void UpdateReprSelector (HdSceneDelegate *delegate, HdDirtyBits *dirtyBits)
 
virtual HD_API void UpdateRenderTag (HdSceneDelegate *delegate, HdRenderParam *renderParam)
 
virtual HdDirtyBits GetInitialDirtyBitsMask () const =0
 Returns the set of dirty bits that should be added to the change tracker for this prim, when this prim is inserted.
 
HD_API bool CanSkipDirtyBitPropagationAndSync (HdDirtyBits bits) const
 This function gives an Rprim the chance to "early exit" from dirty bit propagation, delegate sync and rprim sync altogether.
 
HD_API HdDirtyBits PropagateRprimDirtyBits (HdDirtyBits bits)
 This function gives an Rprim the chance to set additional dirty bits based on those set in the change tracker, before passing the dirty bits to the scene delegate.
 
HD_API void InitRepr (HdSceneDelegate *delegate, TfToken const &reprToken, HdDirtyBits *dirtyBits)
 Initialize the representation of this Rprim by calling _InitRepr.
 
virtual void Sync (HdSceneDelegate *delegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits, TfToken const &reprToken)=0
 Pull invalidated scene data and prepare/update the renderable representation.
 

Static Public Member Functions

static HD_API void ConfigureRepr (TfToken const &reprName, HdMeshReprDesc desc1, HdMeshReprDesc desc2=HdMeshReprDesc())
 Configure the geometric style of the mesh for a given representation.
 

Protected Types

using _MeshReprConfig = _ReprDescConfigs< HdMeshReprDesc, 2 >
 
- Protected Types inherited from HdRprim
using _ReprVector = std::vector< std::pair< TfToken, HdReprSharedPtr > >
 

Protected Member Functions

HD_API HdMesh (SdfPath const &id)
 Constructor.
 
- Protected Member Functions inherited from HdRprim
HD_API HdReprSharedPtr const & _GetRepr (TfToken const &reprToken) const
 
HD_API void _UpdateVisibility (HdSceneDelegate *sceneDelegate, HdDirtyBits *dirtyBits)
 
HD_API void _UpdateInstancer (HdSceneDelegate *sceneDelegate, HdDirtyBits *dirtyBits)
 
virtual HdDirtyBits _PropagateDirtyBits (HdDirtyBits bits) const =0
 This callback from Rprim gives the prim an opportunity to set additional dirty bits based on those already set.
 
virtual void _InitRepr (TfToken const &reprToken, HdDirtyBits *dirtyBits)=0
 Initialize the given representation of this Rprim.
 

Static Protected Member Functions

static HD_API _MeshReprConfig::DescArray _GetReprDesc (TfToken const &reprName)
 

Additional Inherited Members

- Protected Attributes inherited from HdRprim
HdRprimSharedData _sharedData
 
HdReprSelector _authoredReprSelector
 
TfToken _renderTag
 
_ReprVector _reprs
 

Detailed Description

Hydra Schema for a subdivision surface or poly-mesh object.

Definition at line 101 of file mesh.h.

Member Typedef Documentation

◆ _MeshReprConfig

using _MeshReprConfig = _ReprDescConfigs<HdMeshReprDesc, 2>
protected

Definition at line 149 of file mesh.h.

Constructor & Destructor Documentation

◆ HdMesh()

HD_API HdMesh ( SdfPath const &  id)
protected

Constructor.

instancerId, if specified, is the instancer which uses this mesh as a prototype.

Member Function Documentation

◆ ConfigureRepr()

static HD_API void ConfigureRepr ( TfToken const &  reprName,
HdMeshReprDesc  desc1,
HdMeshReprDesc  desc2 = HdMeshReprDesc() 
)
static

Configure the geometric style of the mesh for a given representation.

We currently allow up to 2 descriptors for a representation. Example of when this may be useful: Drawing the outline in addition to the surface for a mesh.

◆ GetBuiltinPrimvarNames()

HD_API TfTokenVector const & GetBuiltinPrimvarNames ( ) const
overridevirtual

Returns the names of built-in primvars, i.e.

primvars that are part of the core geometric schema for this prim.

Implements HdRprim.

◆ GetCullStyle()

HdCullStyle GetCullStyle ( HdSceneDelegate delegate) const
inline

Definition at line 171 of file mesh.h.

◆ GetDisplayStyle()

HdDisplayStyle GetDisplayStyle ( HdSceneDelegate delegate) const
inline

Definition at line 189 of file mesh.h.

◆ GetMeshTopology()

HdMeshTopology GetMeshTopology ( HdSceneDelegate delegate) const
inline

Topological accessors via the scene delegate.

Definition at line 183 of file mesh.h.

◆ GetNormals()

VtValue GetNormals ( HdSceneDelegate delegate) const
inline

Definition at line 213 of file mesh.h.

◆ GetPoints()

VtValue GetPoints ( HdSceneDelegate delegate) const
inline

Primvars Accessors.

Definition at line 207 of file mesh.h.

◆ GetShadingStyle()

VtValue GetShadingStyle ( HdSceneDelegate delegate) const
inline

Definition at line 177 of file mesh.h.

◆ GetSubdivTags()

PxOsdSubdivTags GetSubdivTags ( HdSceneDelegate delegate) const
inline

Definition at line 195 of file mesh.h.

◆ GetTopology()

HdMeshTopologySharedPtr GetTopology ( ) const
inlinevirtual

Topology getter.

Reimplemented in HdStMesh.

Definition at line 201 of file mesh.h.

◆ IsDoubleSided()

bool IsDoubleSided ( HdSceneDelegate delegate) const
inline

Render State.

Definition at line 165 of file mesh.h.


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