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 {
148 unsigned int _type:4;
158 case QUADS :
return 4;
163 case LINES :
return 2;
174 case QUADS :
return 4;
176 case LINES :
return 2;
188 return (_type < other._type);
194 return _type == other._type;
202 using namespace OPENSUBDIV_VERSION;
PatchDescriptor()
Default constructor.
SchemeType
Enumerated type for all subdivisions schemes supported by OpenSubdiv.
lines (useful for cage drawing)
bool IsAdaptive() const
Returns true if the type is an adaptive patch.
short GetNumFVarControlVertices() const
Returns the number of control vertices expected for a patch of the type described.
bool operator==(PatchDescriptor const other) const
True if the descriptors are identical.
static short GetRegularPatchSize()
Number of control vertices of Regular Patches in table.
short GetNumControlVertices() const
Returns the number of control vertices expected for a patch of the type described.
bool operator<(PatchDescriptor const other) const
Allows ordering of patches by type.
Describes the type of a patch.
feature-adaptive bicubic patches
static short GetGregoryBasisPatchSize()
Number of control vertices of Gregory patch basis (20)
bilinear triangles-only mesh
points (useful for cage drawing)
Type GetType() const
Returns the type of the patch.
PatchDescriptor(int type)
Constructor.
PatchDescriptor(PatchDescriptor const &d)
Copy Constructor.
static short GetGregoryPatchSize()
Number of control vertices of Gregory (and Gregory Boundary) Patches in table.
Vtr::ConstArray< PatchDescriptor > ConstPatchDescriptorArray
static bool IsAdaptive(Type type)
Returns true if the type is an adaptive patch.
bilinear quads-only patches
static Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors(Sdc::SchemeType type)
Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme...