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
}
 

Public Member Functions

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

Static Public Member Functions

static bool IsAdaptive (Type type)
 Returns true if the type is an adaptive patch. More...
 
static short GetNumControlVertices (Type t)
 Returns the number of control vertices expected for a patch of the type described. More...
 
static short GetNumFVarControlVertices (Type t)
 
static short GetRegularPatchSize ()
 Number of control vertices of Regular Patches in table. More...
 
static short GetGregoryPatchSize ()
 Number of control vertices of Gregory (and Gregory Boundary) Patches in table. More...
 
static short GetGregoryBasisPatchSize ()
 Number of control vertices of Gregory patch basis (20) More...
 
static Vtr::ConstArray< PatchDescriptorGetAdaptivePatchDescriptors (Sdc::SchemeType type)
 Returns a vector of all the legal patch descriptors for the given adaptive subdivision scheme. More...
 

Detailed Description

Describes the type of a patch.

Uniquely identifies all the different types of patches

  • Uniformly subdivided meshes contain bilinear patches of either QUADS or TRIANGLES
  • Adaptively subdivided meshes contain bicubic patches of types REGULAR, GREGORY, GREGORY_BOUNDARY, GREGORY_BASIS.

Bitfield layout :

Field Bits Content
_type 4 patch type

Definition at line 56 of file patchDescriptor.h.

Member Enumeration Documentation

enum Type
Enumerator
NON_PATCH 

undefined

POINTS 

points (useful for cage drawing)

LINES 

lines (useful for cage drawing)

QUADS 

bilinear quads-only patches

TRIANGLES 

bilinear triangles-only mesh

LOOP 

Loop patch.

REGULAR 

feature-adaptive bicubic patches

GREGORY 
GREGORY_BOUNDARY 
GREGORY_BASIS 

Definition at line 60 of file patchDescriptor.h.

Constructor & Destructor Documentation

PatchDescriptor ( )
inline

Default constructor.

Definition at line 80 of file patchDescriptor.h.

PatchDescriptor ( int  type)
inline

Constructor.

Definition at line 84 of file patchDescriptor.h.

PatchDescriptor ( PatchDescriptor const &  d)
inline

Copy Constructor.

Definition at line 88 of file patchDescriptor.h.

Member Function Documentation

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

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

static short GetGregoryBasisPatchSize ( )
inlinestatic

Number of control vertices of Gregory patch basis (20)

Definition at line 131 of file patchDescriptor.h.

static short GetGregoryPatchSize ( )
inlinestatic

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

Definition at line 128 of file patchDescriptor.h.

short GetNumControlVertices ( Type  t)
inlinestatic

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

Definition at line 155 of file patchDescriptor.h.

short GetNumControlVertices ( ) const
inline

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

Definition at line 114 of file patchDescriptor.h.

short GetNumFVarControlVertices ( Type  t)
inlinestatic

Definition at line 171 of file patchDescriptor.h.

short GetNumFVarControlVertices ( ) const
inline

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

Definition at line 120 of file patchDescriptor.h.

static short GetRegularPatchSize ( )
inlinestatic

Number of control vertices of Regular Patches in table.

Definition at line 125 of file patchDescriptor.h.

Type GetType ( ) const
inline

Returns the type of the patch.

Definition at line 92 of file patchDescriptor.h.

static bool IsAdaptive ( Type  type)
inlinestatic

Returns true if the type is an adaptive patch.

Definition at line 97 of file patchDescriptor.h.

bool IsAdaptive ( ) const
inline

Returns true if the type is an adaptive patch.

Definition at line 102 of file patchDescriptor.h.

bool operator< ( PatchDescriptor const  other) const
inline

Allows ordering of patches by type.

Definition at line 187 of file patchDescriptor.h.

bool operator== ( PatchDescriptor const  other) const
inline

True if the descriptors are identical.

Definition at line 193 of file patchDescriptor.h.

void print ( ) const

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