7#ifndef PXR_IMAGING_HD_MESH_H
8#define PXR_IMAGING_HD_MESH_H
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/enums.h"
14#include "pxr/imaging/hd/meshTopology.h"
15#include "pxr/imaging/hd/rprim.h"
16#include "pxr/imaging/hd/tokens.h"
19PXR_NAMESPACE_OPEN_SCOPE
21#define HD_MESH_REPR_DESC_TOKENS \
23 (surfaceShaderUnlit) \
24 (surfaceShaderSheer) \
25 (surfaceShaderOutline) \
31 HD_MESH_REPR_DESC_TOKENS);
40 HdCullStyle
cullStyle = HdCullStyleDontCare,
61 bool IsEmpty()
const {
62 return geomStyle == HdMeshGeomStyleInvalid;
116 virtual HdMeshTopologySharedPtr
GetTopology()
const;
143 using _MeshReprConfig = _ReprDescConfigs<HdMeshReprDesc, 2>;
146 static _MeshReprConfig::DescArray _GetReprDesc(
TfToken const &reprName);
155 static _MeshReprConfig _reprDescConfig;
194inline HdMeshTopologySharedPtr
197 return HdMeshTopologySharedPtr();
203 return GetPrimvar(delegate, HdTokens->points);
209 return GetPrimvar(delegate, HdTokens->normals);
213PXR_NAMESPACE_CLOSE_SCOPE
Hydra Schema for a subdivision surface or poly-mesh object.
HD_API HdMesh(SdfPath const &id)
Constructor.
virtual HdMeshTopologySharedPtr GetTopology() const
Topology getter.
VtValue GetPoints(HdSceneDelegate *delegate) const
Primvars Accessors.
HD_API TfTokenVector const & GetBuiltinPrimvarNames() const override
Returns the names of built-in primvars, i.e.
static HD_API void ConfigureRepr(TfToken const &reprName, HdMeshReprDesc desc1, HdMeshReprDesc desc2=HdMeshReprDesc())
Configure the geometric style of the mesh for a given representation.
HdMeshTopology GetMeshTopology(HdSceneDelegate *delegate) const
Topological accessors via the scene delegate.
bool IsDoubleSided(HdSceneDelegate *delegate) const
Render State.
Topology data for meshes.
The render engine state for a given rprim from the scene graph.
SdfPath const & GetId() const
Returns the identifier of this Rprim.
Adapter class providing data exchange with the client scene graph.
virtual HD_API HdDisplayStyle GetDisplayStyle(SdfPath const &id)
Returns the refinement level for the given prim in the range [0,8].
virtual HD_API VtValue GetShadingStyle(SdfPath const &id)
Returns the shading style for the given prim.
virtual HD_API bool GetDoubleSided(SdfPath const &id)
Returns the doubleSided state for the given prim.
virtual HD_API HdMeshTopology GetMeshTopology(SdfPath const &id)
Gets the topological mesh data for a given prim.
virtual HD_API PxOsdSubdivTags GetSubdivTags(SdfPath const &id)
Gets the subdivision surface tags (sharpness, holes, etc).
virtual HD_API HdCullStyle GetCullStyle(SdfPath const &id)
Returns the cullstyle for the given prim.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Describes how the geometry of a prim should be displayed.
Descriptor to configure the drawItem(s) for a repr.
bool flatShadingEnabled
Does this mesh want flat shading?
HdCullStyle cullStyle
The culling style: draw front faces, back faces, etc.
bool enableScalarOverride
Should scalar override be allowed on this drawItem.
HdMeshGeomStyle geomStyle
The rendering style: draw refined/unrefined, edge, points, etc.
bool forceOpaqueEdges
If the geom style includes edges, should those edges be forced to be fully opaque,...
bool doubleSided
Should this mesh be treated as double-sided? The resolved value is (prim.doubleSided || repr....
float lineWidth
How big (in pixels) should line drawing be?
TfToken shadingTerminal
Specifies how the fragment color should be computed from surfaceShader; this can be used to render a ...
bool useCustomDisplacement
Should this mesh use displacementShader() to displace points?
bool blendWireframeColor
Should the wireframe color be blended into the color primvar?
std::vector< TfToken > TfTokenVector
Convenience types.