24 #ifndef PXR_IMAGING_HD_MESH_TOPOLOGY_H
25 #define PXR_IMAGING_HD_MESH_TOPOLOGY_H
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/geomSubset.h"
30 #include "pxr/imaging/hd/version.h"
31 #include "pxr/imaging/hd/topology.h"
36 #include "pxr/base/vt/value.h"
42 PXR_NAMESPACE_OPEN_SCOPE
45 using HdMeshTopologySharedPtr = std::shared_ptr<class HdMeshTopology>;
60 HdMeshTopology(
const HdMeshTopology &,
int refineLevel=0);
64 HdMeshTopology(
const TfToken &scheme,
66 const VtIntArray &faceVertexCounts,
67 const VtIntArray &faceVertexIndices,
70 HdMeshTopology(
const TfToken &scheme,
72 const VtIntArray &faceVertexCounts,
73 const VtIntArray &faceVertexIndices,
74 const VtIntArray &holeIndices,
77 virtual ~HdMeshTopology();
80 HdMeshTopology &operator =(
const HdMeshTopology ©);
137 bool operator==(HdMeshTopology
const &other)
const;
151 return _topology.GetHoleIndices();
179 _geomSubsets = geomSubsets;
195 void SetInvisiblePoints(VtIntArray
const &invisiblePoints) {
196 _invisiblePoints = invisiblePoints;
200 VtIntArray
const & GetInvisiblePoints()
const {
201 return _invisiblePoints;
205 void SetInvisibleFaces(VtIntArray
const &invisibleFaces) {
206 _invisibleFaces = invisibleFaces;
210 VtIntArray
const & GetInvisibleFaces()
const {
211 return _invisibleFaces;
217 HdGeomSubsets _geomSubsets;
218 VtIntArray _invisiblePoints;
219 VtIntArray _invisibleFaces;
225 PXR_NAMESPACE_CLOSE_SCOPE
227 #endif // PXR_IMAGING_HD_MESH_TOPOLOGY_H
VtIntArray const & GetHoleIndices() const
Returns the hole face indices.
PxOsdSubdivTags const & GetSubdivTags() const
Returns subdivision tags.
static HD_API bool IsEnabledAdaptive()
Returns whether adaptive subdivision is enabled or not.
VtIntArray const & GetFaceVertexIndices() const
Returns face vertex indics.
virtual HD_API ID ComputeHash() const
Returns the hash value of this topology to be used for instancing.
PXOSD_API PxOsdMeshTopology WithSubdivTags(PxOsdSubdivTags const &tags) const
Return a copy of the topology, changing only the subdiv tags.
HD_API int GetNumPoints() const
Returns the num points of the topology vert indices array.
Topology data for meshes.
VtIntArray const & GetFaceVertexCounts() const
Returns face vertex counts.
PxOsdSubdivTags const & GetSubdivTags() const
Returns subdivision tags.
HD_API bool operator==(HdMeshTopology const &other) const
Equality check between two mesh topologies.
Token for efficient comparison, assignment, and hashing of known strings.
void SetSubdivTags(PxOsdSubdivTags const &subdivTags)
Sets subdivision tags.
VtIntArray const & GetFaceVertexCounts() const
Returns face vertex counts.
void SetHoleIndices(VtIntArray const &holeIndices)
Sets hole face indices.
static HD_API int ComputeNumPoints(VtIntArray const &verts)
Returns the num points by looking vert indices array.
HD_API int GetNumFaceVaryings() const
Returns the num facevarying primvars.
VtIntArray const & GetFaceVertexIndices() const
Returns face vertex indices.
TfToken const GetScheme() const
Returns the subdivision scheme.
PXOSD_API PxOsdMeshTopology WithHoleIndices(VtIntArray const &holeIndices) const
Return a copy of the topology, changing only the hole indices.
HD_API int GetNumFaces() const
Returns the num faces.
TfToken const & GetOrientation() const
Returns orientation.
int GetRefineLevel() const
Returns the refinement level.
HD_API void SetGeomSubsets(HdGeomSubsets const &geomSubsets)
Sets geometry subsets.
TfToken const GetScheme() const
Returns the subdivision scheme.
Topology data for meshes.
HD_API HdGeomSubsets const & GetGeomSubsets() const
Returns geometry subsets.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
TfToken const & GetOrientation() const
Returns orientation.