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

Container for patch vertex indices tables. More...

#include <patchTables.h>

Classes

class  Descriptor
 Describes the type of a patch. More...
 
class  Descriptor
 Describes the type of a patch. More...
 
class  Descriptor
 Describes the type of a patch. More...
 
class  FVarPatchTables
 Face-varying patch vertex indices tables. More...
 
class  FVarPatchTables
 Face-varying patch vertex indices tables. More...
 
class  FVarPatchTables
 Face-varying patch vertex indices tables. More...
 
class  PatchArray
 Describes an array of patches of the same type. More...
 
class  PatchArray
 Describes an array of patches of the same type. More...
 
class  PatchArray
 Describes an array of patches of the same type. More...
 

Public Types

enum  Type {
  NON_PATCH = 0, POINTS, LINES, QUADS,
  TRIANGLES, LOOP, REGULAR, BOUNDARY,
  CORNER, GREGORY, GREGORY_BOUNDARY
}
 
enum  TransitionPattern {
  NON_TRANSITION = 0, PATTERN0, PATTERN1, PATTERN2,
  PATTERN3, PATTERN4
}
 
typedef std::vector< unsigned int > PTable
 
typedef std::vector< int > VertexValenceTable
 
typedef std::vector< unsigned int > QuadOffsetTable
 
typedef std::vector< PatchParamPatchParamTable
 
typedef std::vector< PatchArrayPatchArrayVector
 

Public Member Functions

PTable const & GetPatchTable () const
 Get the table of patch control vertices. More...
 
PatchArray const * GetPatchArray (Descriptor desc) const
 Returns a pointer to the array of patches matching the descriptor. More...
 
PatchArrayVector const & GetPatchArrayVector () const
 Returns all arrays of patches. More...
 
PatchArray const * GetPatchArray (int level=0) const
 
unsigned int const * GetFaceVertices (int level=0) const
 Returns a pointer to the vertex indices of uniformly subdivided faces. More...
 
int GetNumFaces (int level=0) const
 Returns the number of faces in a uniformly subdivided mesh at a given level. More...
 
VertexValenceTable const & GetVertexValenceTable () const
 Returns a vertex valence table used by Gregory patches. More...
 
QuadOffsetTable const & GetQuadOffsetTable () const
 Returns a quad offsets table used by Gregory patches. More...
 
PatchParamTable const & GetPatchParamTable () const
 Returns a PatchParamTable for each type of patch. More...
 
int GetNumPatches () const
 Returns the total number of patches stored in the tables. More...
 
int GetNumControlVertices () const
 Returns the total number of control vertex indices in the tables. More...
 
int GetMaxValence () const
 Returns max vertex valence. More...
 
bool IsFeatureAdaptive () const
 True if the patches are of feature adaptive types. More...
 
int GetNumPtexFaces () const
 Returns the total number of vertices in the mesh across across all depths. More...
 
FVarPatchTables const * GetFVarPatchTables () const
 Returns the face-varying patches. More...
 
 PatchTables (PatchArrayVector const &patchArrays, PTable const &patches, VertexValenceTable const *vertexValences, QuadOffsetTable const *quadOffsets, PatchParamTable const *patchParams, FVarPatchTables const *fvarPatchTables, int maxValence)
 Public constructor. More...
 
 ~PatchTables ()
 Destructor. More...
 

Static Public Member Functions

static short GetRegularPatchRingsize ()
 Ringsize of Regular Patches in table. More...
 
static short GetBoundaryPatchRingsize ()
 Ringsize of Boundary Patches in table. More...
 
static short GetCornerPatchRingsize ()
 Ringsize of Boundary Patches in table. More...
 
static short GetGregoryPatchRingsize ()
 Ringsize of Gregory (and Gregory Boundary) Patches in table. More...
 

Friends

class PatchTablesFactory
 

Detailed Description

Container for patch vertex indices tables.

PatchTables contain the lists of vertices for each patch of an adaptive mesh representation.

Definition at line 49 of file patchTables.h.

Member Typedef Documentation

typedef std::vector<PatchArray> PatchArrayVector

Definition at line 304 of file patchTables.h.

typedef std::vector<PatchParam> PatchParamTable

Definition at line 55 of file patchTables.h.

typedef std::vector<unsigned int> PTable

Definition at line 52 of file patchTables.h.

typedef std::vector<unsigned int> QuadOffsetTable

Definition at line 54 of file patchTables.h.

typedef std::vector<int> VertexValenceTable

Definition at line 53 of file patchTables.h.

Member Enumeration Documentation

Enumerator
NON_TRANSITION 
PATTERN0 
PATTERN1 
PATTERN2 
PATTERN3 
PATTERN4 

Definition at line 75 of file patchTables.h.

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 (unsupported)

REGULAR 

feature-adaptive bicubic patches

BOUNDARY 
CORNER 
GREGORY 
GREGORY_BOUNDARY 

Definition at line 57 of file patchTables.h.

Constructor & Destructor Documentation

PatchTables ( PatchArrayVector const &  patchArrays,
PTable const &  patches,
VertexValenceTable const *  vertexValences,
QuadOffsetTable const *  quadOffsets,
PatchParamTable const *  patchParams,
FVarPatchTables const *  fvarPatchTables,
int  maxValence 
)
inline

Public constructor.

Parameters
patchArraysVector of descriptors and ranges for arrays of patches
patchesIndices of the control vertices of the patches
vertexValencesVertex valance table
quadOffsetsQuad offset table
fvarPatchTablesIndices of the face-varying control vertices of the patches
patchParamsLocal patch parameterization
maxValenceHighest vertex valence allowed in the mesh

Definition at line 631 of file patchTables.h.

~PatchTables ( )
inline

Destructor.

Definition at line 461 of file patchTables.h.

Member Function Documentation

static short GetBoundaryPatchRingsize ( )
inlinestatic

Ringsize of Boundary Patches in table.

Definition at line 376 of file patchTables.h.

static short GetCornerPatchRingsize ( )
inlinestatic

Ringsize of Boundary Patches in table.

Definition at line 379 of file patchTables.h.

unsigned int const * GetFaceVertices ( int  level = 0) const
inline

Returns a pointer to the vertex indices of uniformly subdivided faces.

In uniform mode the PatchTablesFactory can be set to generate either a patch array containing the faces at the highest level of subdivision, or a range of arrays, corresponding to multiple successive levels of subdivision.

Note : level '0' is not the coarse mesh. Currently there is no path in the factories to convert the coarse mesh to PatchTables.

Parameters
levelthe level of subdivision of the faces (returns the highest level by default)
Returns
a pointer to the first vertex index or NULL if the mesh is not uniformly subdivided or the level cannot be found.

Definition at line 744 of file patchTables.h.

FVarPatchTables const* GetFVarPatchTables ( ) const
inline

Returns the face-varying patches.

Definition at line 434 of file patchTables.h.

static short GetGregoryPatchRingsize ( )
inlinestatic

Ringsize of Gregory (and Gregory Boundary) Patches in table.

Definition at line 382 of file patchTables.h.

int GetMaxValence ( ) const
inline

Returns max vertex valence.

Definition at line 391 of file patchTables.h.

int GetNumControlVertices ( ) const
inline

Returns the total number of control vertex indices in the tables.

Definition at line 693 of file patchTables.h.

int GetNumFaces ( int  level = 0) const
inline

Returns the number of faces in a uniformly subdivided mesh at a given level.

In uniform mode the PatchTablesFactory can be set to generate either a patch array containing the faces at the highest level of subdivision, or a range of arrays, corresponding to multiple successive levels of subdivision.

Note : level '0' is not the coarse mesh. Currently there is no path in the factories to convert the coarse mesh to PatchTables.

Parameters
levelthe level of subdivision of the faces (returns the highest level by default)
Returns
the number of faces in the mesh given the subdivision level or -1 if the mesh is not uniform or the level is incorrect.

Definition at line 756 of file patchTables.h.

int GetNumPatches ( ) const
inline

Returns the total number of patches stored in the tables.

Definition at line 795 of file patchTables.h.

int GetNumPtexFaces ( ) const
inline

Returns the total number of vertices in the mesh across across all depths.

Definition at line 397 of file patchTables.h.

PatchArray const* GetPatchArray ( Descriptor  desc) const
inline

Returns a pointer to the array of patches matching the descriptor.

Definition at line 310 of file patchTables.h.

PatchTables::PatchArray const * GetPatchArray ( int  level = 0) const
inline

brief Returns a pointer to the PatchArry of uniformly subdivided faces at 'level'

Parameters
levelthe level of subdivision of the faces (returns the highest level by default)
Returns
a pointer to the PatchArray or NULL if the mesh is not uniformly subdivided or the level cannot be found.

Definition at line 723 of file patchTables.h.

PatchArrayVector const& GetPatchArrayVector ( ) const
inline

Returns all arrays of patches.

Definition at line 315 of file patchTables.h.

PatchParamTable const& GetPatchParamTable ( ) const
inline

Returns a PatchParamTable for each type of patch.

Definition at line 370 of file patchTables.h.

PTable const& GetPatchTable ( ) const
inline

Get the table of patch control vertices.

Definition at line 307 of file patchTables.h.

QuadOffsetTable const& GetQuadOffsetTable ( ) const
inline

Returns a quad offsets table used by Gregory patches.

Definition at line 367 of file patchTables.h.

static short GetRegularPatchRingsize ( )
inlinestatic

Ringsize of Regular Patches in table.

Definition at line 373 of file patchTables.h.

VertexValenceTable const& GetVertexValenceTable ( ) const
inline

Returns a vertex valence table used by Gregory patches.

Definition at line 364 of file patchTables.h.

bool IsFeatureAdaptive ( ) const
inline

True if the patches are of feature adaptive types.

Definition at line 654 of file patchTables.h.

Friends And Related Function Documentation

friend class PatchTablesFactory
friend

Definition at line 465 of file patchTables.h.


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