All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PatchTables::Descriptor Class Reference

Describes the type of a patch. More...

#include <patchTables.h>

Classes

class  iterator
 Descriptor iterator class. More...
 
class  iterator
 Descriptor iterator class. More...
 

Public Types

enum  PrimType { ANY, FEATURE_ADAPTIVE_CATMARK }
 

Public Member Functions

 Descriptor ()
 Default constructor. More...
 
 Descriptor (int type, int pattern, unsigned char rotation)
 Constructor. More...
 
 Descriptor (Descriptor const &d)
 Copy Constructor. More...
 
Type GetType () const
 Returns the type of the patch. More...
 
TransitionPattern GetPattern () const
 Returns the transition pattern of the patch if any (5 types) More...
 
unsigned char GetRotation () const
 Returns the rotation of the patch (4 rotations) 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< (Descriptor const other) const
 Allows ordering of patches by type. More...
 
bool operator== (Descriptor const other) const
 True if the descriptors are identical. More...
 

Static Public Member Functions

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 std::vector< Descriptor >
const & 
GetAllValidDescriptors ()
 Returns a vector of all the legal patch descriptors. More...
 
static iterator begin (PrimType type)
 Returns a patch type iterator. More...
 
static iterator end ()
 Returns an iterator to the end of the list of patch types (NON_PATCH) More...
 

Friends

class PatchTablesFactory
 
class iterator
 

Detailed Description

Describes the type of a patch.

Uniquely identifies all the types of patches in a mesh :

  • Raw polygon meshes are identified as POLYGONS and can contain faces with arbitrary number of vertices
  • Uniformly subdivided meshes contain bilinear patches of either QUADS or TRIANGLES
  • Adaptively subdivided meshes contain bicubic patches of types REGULAR, BOUNDARY, CORNER, GREGORY, GREGORY_BOUNDARY. These bicubic patches are also further distinguished by a transition pattern as well as a rotational orientation.

An iterator class is provided as a convenience to enumerate over the set of valid feature adaptive patch descriptors.

Definition at line 102 of file patchTables.h.

Member Enumeration Documentation

enum PrimType
Enumerator
ANY 
FEATURE_ADAPTIVE_CATMARK 

Definition at line 190 of file patchTables.h.

Constructor & Destructor Documentation

Descriptor ( )
inline

Default constructor.

Definition at line 106 of file patchTables.h.

Descriptor ( int  type,
int  pattern,
unsigned char  rotation 
)
inline

Constructor.

Definition at line 110 of file patchTables.h.

Descriptor ( Descriptor const &  d)
inline

Copy Constructor.

Definition at line 114 of file patchTables.h.

Member Function Documentation

PatchTables::Descriptor::iterator begin ( PrimType  type)
inlinestatic

Returns a patch type iterator.

Parameters
typeif type=ANY then the iterater points to type POINTS if type=FEATURE_ADAPTIVE_CATMARK then the iterator points to type NON_TRANSITION REGULAR

Definition at line 612 of file patchTables.h.

PatchTables::Descriptor::iterator end ( )
inlinestatic

Returns an iterator to the end of the list of patch types (NON_PATCH)

Definition at line 625 of file patchTables.h.

std::vector< PatchTables::Descriptor > const & GetAllValidDescriptors ( )
inlinestatic

Returns a vector of all the legal patch descriptors.

Definition at line 574 of file patchTables.h.

short GetNumControlVertices ( PatchTables::Type  type)
inlinestatic

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

Definition at line 676 of file patchTables.h.

short GetNumControlVertices ( ) const
inline

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

Definition at line 140 of file patchTables.h.

short GetNumFVarControlVertices ( PatchTables::Type  type)
inlinestatic

Definition at line 706 of file patchTables.h.

short GetNumFVarControlVertices ( ) const
inline

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

Definition at line 146 of file patchTables.h.

TransitionPattern GetPattern ( ) const
inline

Returns the transition pattern of the patch if any (5 types)

Definition at line 123 of file patchTables.h.

unsigned char GetRotation ( ) const
inline

Returns the rotation of the patch (4 rotations)

Definition at line 128 of file patchTables.h.

Type GetType ( ) const
inline

Returns the type of the patch.

Definition at line 118 of file patchTables.h.

bool operator< ( Descriptor const  other) const
inline

Allows ordering of patches by type.

Definition at line 768 of file patchTables.h.

bool operator== ( Descriptor const  other) const
inline

True if the descriptors are identical.

Definition at line 776 of file patchTables.h.

Friends And Related Function Documentation

friend class iterator
friend

Definition at line 206 of file patchTables.h.

friend class PatchTablesFactory
friend

Definition at line 205 of file patchTables.h.


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