![]() |
|
Utility to help validate an OpenSubdiv Mesh topology. More...
Classes | |
struct | Invalidation |
A tuple containing a code describing an invalidation and a descriptive message. More... | |
Public Types | |
enum | Code { InvalidScheme, InvalidOrientation, InvalidTriangleSubdivision, InvalidVertexInterpolationRule, InvalidFaceVaryingInterpolationRule, InvalidCreaseMethod, InvalidCreaseLengthElement, InvalidCreaseIndicesSize, InvalidCreaseIndicesElement, InvalidCreaseWeightsSize, NegativeCreaseWeights, InvalidCornerIndicesElement, NegativeCornerWeights, InvalidCornerWeightsSize, InvalidHoleIndicesElement, InvalidFaceVertexCountsElement, InvalidFaceVertexIndicesElement, InvalidFaceVertexIndicesSize } |
Codes for various invalid states for PxOsdMeshTopology. More... | |
using | iterator = std::vector< Invalidation >::const_iterator |
using | const_iterator = std::vector< Invalidation >::const_iterator |
Public Member Functions | |
PxOsdMeshTopologyValidation (PxOsdMeshTopologyValidation &&)=default | |
PxOsdMeshTopologyValidation & | operator= (PxOsdMeshTopologyValidation &&)=default |
PxOsdMeshTopologyValidation (PxOsdMeshTopologyValidation const &other)=default | |
PxOsdMeshTopologyValidation & | operator= (PxOsdMeshTopologyValidation const &other)=default |
operator bool () const | |
Return true if the topology is valid. More... | |
const_iterator | begin () const |
Returns an iterator for the beginning of the invalidation vector if it has been initialized. More... | |
const_iterator | end () const |
Returns an iterator for the end of the invalidation vector if it has been initialized. More... | |
const_iterator | cbegin () const |
Returns an iterator for the beginning of the invalidation vector if it has been initialized. More... | |
const_iterator | cend () const |
Returns an iterator for the end of the invalidation vector if it has been initialized. More... | |
Friends | |
class | PxOsdMeshTopology |
Utility to help validate an OpenSubdiv Mesh topology.
This class is created by PxOsdMeshTopology's Validate method.
Internally, this will avoid dynamic allocations as long as the topology is valid (currently using std::unique_ptr but targeting std::optional for C++17).
This class does a set of basic validation tests on the topology of a mesh. This set of tests isn't necessarily complete. There are other cases like invalid primvar size that this will not check for.
Topology is considered valid if it passes a series of checks enumerated by the Code class enum.
\warn This doesn't currently validate that the topology of crease indices match valid edges.
Definition at line 61 of file meshTopologyValidation.h.
struct PxOsdMeshTopologyValidation::Invalidation |
A tuple containing a code describing an invalidation and a descriptive message.
Definition at line 112 of file meshTopologyValidation.h.
Class Members | ||
---|---|---|
Code | code | |
string | message |
|
strong |
Codes for various invalid states for PxOsdMeshTopology.
Definition at line 65 of file meshTopologyValidation.h.
|
inline |
Returns an iterator for the beginning of the invalidation vector if it has been initialized.
Otherwise, returns an empty iterator.
Definition at line 187 of file meshTopologyValidation.h.
|
inline |
Returns an iterator for the beginning of the invalidation vector if it has been initialized.
Otherwise, returns an empty iterator.
Definition at line 200 of file meshTopologyValidation.h.
|
inline |
Returns an iterator for the end of the invalidation vector if it has been initialized.
Otherwise, returns an empty iterator.
Definition at line 206 of file meshTopologyValidation.h.
|
inline |
Returns an iterator for the end of the invalidation vector if it has been initialized.
Otherwise, returns an empty iterator.
Definition at line 193 of file meshTopologyValidation.h.
|
inlineexplicit |
Return true if the topology is valid.
Definition at line 178 of file meshTopologyValidation.h.