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 |
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.
|
inline |
Resets everything to 0.
Definition at line 142 of file patchParam.h.
|
inline |
Sets the values of the bit fields.
faceid | ptex face index |
u | value of the u parameter for the first corner of the face |
v | value of the v parameter for the first corner of the face |
rots | rotations required to reproduce CCW face-winding |
depth | subdivision level of the patch |
nonquad | true if the root face is not a quad |
Definition at line 136 of file patchParam.h.
struct OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchParam::BitField bitField |
unsigned int faceIndex |
Definition at line 60 of file patchParam.h.