OpenSubdiv: PatchDescriptor Class Reference

| OpenSubdiv

Loading...
Searching...
No Matches
PatchDescriptor Class Reference

Describes the type of a patch. More...

`#include <patchDescriptor.h>`

## Public Types
enum | Type { NON_PATCH = 0 , POINTS , LINES , QUADS , TRIANGLES , LOOP , REGULAR , GREGORY , GREGORY_BOUNDARY , GREGORY_BASIS , GREGORY_TRIANGLE }

## Public Member Functions
| PatchDescriptor ()
| Default constructor.
| PatchDescriptor (int type)
| Constructor.
| PatchDescriptor (PatchDescriptor const &d)
| Copy Constructor.
PatchDescriptor & | operator= (PatchDescriptor const &d)
| Assignment operator.
Type | GetType () const
| Returns the type of the patch.
bool | IsAdaptive () const
| Returns true if the type is an adaptive patch.
short | GetNumControlVertices () const
| Returns the number of control vertices expected for a patch of the type described.
short | GetNumFVarControlVertices () const
| Deprecated.
bool | operator< (PatchDescriptor const other) const
| Allows ordering of patches by type.
bool | operator== (PatchDescriptor const other) const
| True if the descriptors are identical.
void | print () const

## Static Public Member Functions
static bool | IsAdaptive (Type type)
| Returns true if the type is an adaptive (non-linear) patch.
static short | GetNumControlVertices (Type t)
| Returns the number of control vertices expected for a patch of the type described.
static short | GetNumFVarControlVertices (Type t)
| Deprecated.
static short | GetRegularPatchSize ()
| Number of control vertices of Regular Patches in table.
static short | GetGregoryPatchSize ()
| Number of control vertices of Gregory (and Gregory Boundary) Patches in table.
static short | GetGregoryBasisPatchSize ()
| Number of control vertices of Gregory patch basis (20).
static Vtr::ConstArray< PatchDescriptor > | GetAdaptivePatchDescriptors (Sdc::SchemeType type)
| Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme.

## Detailed Description

Describes the type of a patch.

Uniquely identifies all the different types of patches

Definition at line 27 of file patchDescriptor.h.

## Member Enumeration Documentation

## ◆ Type

enum Type

Enumerator
NON_PATCH | undefined
POINTS | points (useful for cage drawing)
LINES | lines (useful for cage drawing)
QUADS | 4-sided quadrilateral (bilinear)
TRIANGLES | 3-sided triangle
LOOP | regular triangular patch for the Loop scheme
REGULAR | regular B-Spline patch for the Catmark scheme
GREGORY |
GREGORY_BOUNDARY |
GREGORY_BASIS |
GREGORY_TRIANGLE |

Definition at line 31 of file patchDescriptor.h.

## Constructor & Destructor Documentation

## ◆ PatchDescriptor() [1/3]

PatchDescriptor | ( |  | ) |
| inline

Default constructor.

Definition at line 52 of file patchDescriptor.h.

## ◆ PatchDescriptor() [2/3]

PatchDescriptor | ( | int | type | ) |
| inline

Constructor.

Definition at line 56 of file patchDescriptor.h.

## ◆ PatchDescriptor() [3/3]

PatchDescriptor | ( | PatchDescriptor const & | d | ) |
| inline

Copy Constructor.

Definition at line 60 of file patchDescriptor.h.

## Member Function Documentation

## ◆ GetAdaptivePatchDescriptors()

Vtr::ConstArray< PatchDescriptor > GetAdaptivePatchDescriptors | ( | Sdc::SchemeType | type | ) |
| static

Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme.

## ◆ GetGregoryBasisPatchSize()

short GetGregoryBasisPatchSize | ( |  | ) |
| inlinestatic

Number of control vertices of Gregory patch basis (20).

Definition at line 109 of file patchDescriptor.h.

## ◆ GetGregoryPatchSize()

short GetGregoryPatchSize | ( |  | ) |
| inlinestatic

Number of control vertices of Gregory (and Gregory Boundary) Patches in table.

Definition at line 106 of file patchDescriptor.h.

## ◆ GetNumControlVertices() [1/2]

short GetNumControlVertices | ( |  | ) | const
| inline

Returns the number of control vertices expected for a patch of the type described.

Definition at line 93 of file patchDescriptor.h.

## ◆ GetNumControlVertices() [2/2]

short GetNumControlVertices | ( | Type | t | ) |
| inlinestatic

Returns the number of control vertices expected for a patch of the type described.

Definition at line 133 of file patchDescriptor.h.

## ◆ GetNumFVarControlVertices() [1/2]

short GetNumFVarControlVertices | ( |  | ) | const
| inline

Deprecated.

See also
  PatchDescriptor::GetNumControlVertices

Definition at line 98 of file patchDescriptor.h.

## ◆ GetNumFVarControlVertices() [2/2]

short GetNumFVarControlVertices | ( | Type | t | ) |
| inlinestatic

Deprecated.

See also
  PatchDescriptor::GetNumControlVertices

Definition at line 151 of file patchDescriptor.h.

## ◆ GetRegularPatchSize()

short GetRegularPatchSize | ( |  | ) |
| inlinestatic

Number of control vertices of Regular Patches in table.

Definition at line 103 of file patchDescriptor.h.

## ◆ GetType()

Type GetType | ( |  | ) | const
| inline

Returns the type of the patch.

Definition at line 70 of file patchDescriptor.h.

## ◆ IsAdaptive() [1/2]

bool IsAdaptive | ( |  | ) | const
| inline

Returns true if the type is an adaptive patch.

Definition at line 80 of file patchDescriptor.h.

## ◆ IsAdaptive() [2/2]

bool IsAdaptive | ( | Type | type | ) |
| inlinestatic

Returns true if the type is an adaptive (non-linear) patch.

Definition at line 75 of file patchDescriptor.h.

## ◆ operator<()

bool operator< | ( | PatchDescriptor const | other | ) | const
| inline

Allows ordering of patches by type.

Definition at line 156 of file patchDescriptor.h.

## ◆ operator=()

PatchDescriptor & operator= | ( | PatchDescriptor const & | d | ) |
| inline

Assignment operator.

Definition at line 64 of file patchDescriptor.h.

## ◆ operator==()

bool operator== | ( | PatchDescriptor const | other | ) | const
| inline

True if the descriptors are identical.

Definition at line 163 of file patchDescriptor.h.

## ◆ print()

void print | ( |  | ) | const

The documentation for this class was generated from the following file:

- opensubdiv/far/patchDescriptor.h