24 #ifndef PXR_IMAGING_PX_OSD_MESH_TOPOLOGY_H
25 #define PXR_IMAGING_PX_OSD_MESH_TOPOLOGY_H
30 #include "pxr/imaging/pxOsd/api.h"
32 #include "pxr/imaging/pxOsd/meshTopologyValidation.h"
35 #include "pxr/base/vt/value.h"
39 PXR_NAMESPACE_OPEN_SCOPE
78 PxOsdMeshTopology& operator=(
const PxOsdMeshTopology &) =
default;
79 PxOsdMeshTopology(
const PxOsdMeshTopology &) =
default;
80 PxOsdMeshTopology(PxOsdMeshTopology&&) =
default;
81 PxOsdMeshTopology& operator=(PxOsdMeshTopology&&) =
default;
82 ~PxOsdMeshTopology() =
default;
89 VtIntArray
const& faceVertexCounts,
90 VtIntArray
const& faceVertexIndices);
97 VtIntArray
const& faceVertexCounts,
98 VtIntArray
const& faceVertexIndices,
99 VtIntArray
const& holeIndices);
106 VtIntArray
const& faceVertexCounts,
107 VtIntArray
const& faceVertexIndices,
108 VtIntArray
const& holeIndices,
116 VtIntArray
const& faceVertexCounts,
117 VtIntArray
const& faceVertexIndices,
129 return _faceVertexCounts;
134 return _faceVertexIndices;
147 VtIntArray
const &GetHoleIndices()
const {
179 GetHoleIndices(), tags);
196 bool operator==(PxOsdMeshTopology
const &other)
const;
229 VtIntArray _faceVertexCounts;
230 VtIntArray _faceVertexIndices;
231 VtIntArray _holeIndices;
236 std::atomic<bool> value;
238 _Validated() : value(false) {}
239 _Validated(
const _Validated& other) : value(other.value.load()) {}
240 _Validated(_Validated&& other) : value(other.value.load()) {
243 _Validated& operator=(
const _Validated& other) {
244 value.store(other.value.load());
247 _Validated& operator=(_Validated&& other) {
248 value.store(other.value.load());
258 mutable _Validated _validated;
262 std::ostream&
operator << (std::ostream &out, PxOsdMeshTopology
const &);
264 bool operator!=(
const PxOsdMeshTopology& lhs,
const PxOsdMeshTopology& rhs);
267 PXR_NAMESPACE_CLOSE_SCOPE
269 #endif // PXR_IMAGING_PX_OSD_MESH_TOPOLOGY_H
PxOsdSubdivTags const & GetSubdivTags() const
Returns subdivision tags.
AR_API bool operator!=(const ArAssetInfo &lhs, const ArAssetInfo &rhs)
PXOSD_API PxOsdMeshTopology WithSubdivTags(PxOsdSubdivTags const &tags) const
Return a copy of the topology, changing only the subdiv tags.
PXOSD_API PxOsdMeshTopologyValidation Validate() const
Returns a validation object which is empty if the topology is valid.
Topology data for meshes.
VtIntArray const & GetFaceVertexCounts() const
Returns face vertex counts.
PXOSD_API bool operator==(PxOsdMeshTopology const &other) const
Equality check between two mesh topologies.
Token for efficient comparison, assignment, and hashing of known strings.
PXOSD_API PxOsdMeshTopology WithScheme(TfToken const &scheme) const
Return a copy of the topology, changing only the scheme.
VtIntArray const & GetFaceVertexIndices() const
Returns face vertex indices.
PXOSD_API PxOsdMeshTopology WithHoleIndices(VtIntArray const &holeIndices) const
Return a copy of the topology, changing only the hole indices.
Utility to help validate an OpenSubdiv Mesh topology.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
TfToken const GetScheme() const
Returns the subdivision scheme.
PXOSD_API ID ComputeHash() const
Returns the hash value of this topology to be used for instancing.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
TfToken const & GetOrientation() const
Returns orientation.