All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PatchParam Struct Reference

Local patch parameterization descriptor. More...

#include <patchParam.h>

Classes

struct  BitField
 
struct  BitField
 

Public Member Functions

void Set (unsigned int faceid, short u, short v, unsigned char rots, unsigned char depth, bool nonquad)
 Sets the values of the bit fields. More...
 
void Clear ()
 Resets everything to 0. More...
 

Public Attributes

unsigned int faceIndex:32
 
struct
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchParam::BitField 
bitField
 

Detailed Description

Local patch parameterization descriptor.

Coarse mesh faces are split into sets of patches in both uniform and feature adaptive modes. In order to maintain local patch parameterization, it is necessary to retain some information, such as level of subdivision, face- winding status... This parameterization is directly applicable to ptex textures, but has to be remapped to a specific layout for uv textures.

Bitfield layout :

Field Bits Content
level 4 the subdivision level of the patch
nonquad 1 whether the patch is the child of a non-quad face
rotation 2 patch rotations necessary to match CCW face-winding
v 10 log2 value of u parameter at first patch corner
u 10 log2 value of v parameter at first patch corner
reserved1 5 padding

Note : the bitfield is not expanded in the struct due to differences in how GPU & CPU compilers pack bit-fields and endian-ness.

Definition at line 59 of file patchParam.h.

Member Function Documentation

void Clear ( )
inline

Resets everything to 0.

Definition at line 142 of file patchParam.h.

void Set ( unsigned int  faceid,
short  u,
short  v,
unsigned char  rots,
unsigned char  depth,
bool  nonquad 
)
inline

Sets the values of the bit fields.

Parameters
faceidptex face index
uvalue of the u parameter for the first corner of the face
vvalue of the v parameter for the first corner of the face
rotsrotations required to reproduce CCW face-winding
depthsubdivision level of the patch
nonquadtrue if the root face is not a quad

Definition at line 136 of file patchParam.h.

Member Data Documentation

unsigned int faceIndex

Definition at line 60 of file patchParam.h.


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