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