25 #ifndef OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H 26 #define OPENSUBDIV3_FAR_PATCH_DESCRIPTOR_H 28 #include "../version.h" 30 #include "../far/types.h" 31 #include "../sdc/types.h" 36 namespace OPENSUBDIV_VERSION {
153 case LOOP :
return 12;
154 case QUADS :
return 4;
160 case LINES :
return 2;
175 return (_type < other._type);
181 return _type == other._type;
189 using namespace OPENSUBDIV_VERSION;
regular B-Spline patch for the Catmark scheme
points (useful for cage drawing)
PatchDescriptor(int type)
Constructor.
static short GetGregoryPatchSize()
Number of control vertices of Gregory (and Gregory Boundary) Patches in table.
regular triangular patch for the Loop scheme
Vtr::ConstArray< PatchDescriptor > ConstPatchDescriptorArray
static short GetGregoryBasisPatchSize()
Number of control vertices of Gregory patch basis (20)
SchemeType
Enumerated type for all subdivision schemes supported by OpenSubdiv.
static bool IsAdaptive(Type type)
Returns true if the type is an adaptive (non-linear) patch.
Type GetType() const
Returns the type of the patch.
lines (useful for cage drawing)
PatchDescriptor()
Default constructor.
static Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors(Sdc::SchemeType type)
Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme.
4-sided quadrilateral (bilinear)
bool IsAdaptive() const
Returns true if the type is an adaptive patch.
short GetNumFVarControlVertices() const
Deprecated.
short GetNumControlVertices() const
Returns the number of control vertices expected for a patch of the type described.
static short GetRegularPatchSize()
Number of control vertices of Regular Patches in table.
PatchDescriptor(PatchDescriptor const &d)
Copy Constructor.
PatchDescriptor & operator=(PatchDescriptor const &d)
Assignment operator.
bool operator<(PatchDescriptor const other) const
Allows ordering of patches by type.
bool operator==(PatchDescriptor const other) const
True if the descriptors are identical.
Describes the type of a patch.