Ptex
|
Information about a face, as stored in the Ptex file header. More...
#include <Ptexture.h>
Public Types | |
enum | { flag_constant = 1 , flag_hasedits = 2 , flag_nbconstant = 4 , flag_subface = 8 } |
Flag bit values (for internal use). More... | |
Public Member Functions | |
FaceInfo () | |
Default constructor. | |
FaceInfo (Res res_) | |
Constructor. | |
FaceInfo (Res res_, int adjfaces_[4], int adjedges_[4], bool isSubface_=false) | |
Constructor. | |
EdgeId | adjedge (int eid) const |
Access an adjacent edge id. The eid value must be 0..3. | |
int | adjface (int eid) const |
Access an adjacent face id. The eid value must be 0..3. | |
bool | isConstant () const |
Determine if face is constant (by checking a flag). | |
bool | isNeighborhoodConstant () const |
Determine if neighborhood of face is constant (by checking a flag). | |
bool | hasEdits () const |
Determine if face has edits in the file (by checking a flag). | |
bool | isSubface () const |
Determine if face is a subface (by checking a flag). | |
void | setadjfaces (int f0, int f1, int f2, int f3) |
Set the adjfaces data. | |
void | setadjedges (int e0, int e1, int e2, int e3) |
Set the adjedges data. | |
Public Attributes | |
Res | res |
Resolution of face. | |
uint8_t | adjedges |
Adjacent edges, 2 bits per edge. | |
uint8_t | flags |
Flags. | |
int32_t | adjfaces [4] |
Adjacent faces (-1 == no adjacent face). | |
Information about a face, as stored in the Ptex file header.
The FaceInfo data contains the face resolution and neighboring face adjacency information as well as a set of flags describing the face.
The adjfaces data member contains the face ids of the four neighboring faces. The neighbors are accessed in EdgeId order, CCW, starting with the bottom edge. The adjedges data member contains the corresponding edge id for each neighboring face.
If a face has no neighbor for a given edge, the adjface id should be -1, and the adjedge id doesn't matter (but is typically zero).
If an adjacent face is a pair of subfaces, the id of the first subface as encountered in a CCW traversal should be stored as the adjface id.
Definition at line 229 of file Ptexture.h.
anonymous enum |
Flag bit values (for internal use).
Enumerator | |
---|---|
flag_constant | |
flag_hasedits | |
flag_nbconstant | |
flag_subface |
Definition at line 282 of file Ptexture.h.
|
inline |
|
inline |
|
inline |
Constructor.
Definition at line 248 of file Ptexture.h.
References setadjedges(), and setadjfaces().
|
inline |
Access an adjacent edge id. The eid value must be 0..3.
Definition at line 256 of file Ptexture.h.
References adjedges.
Referenced by PtexSeparableFilter::applyAcrossEdge(), and PtexTriangleFilter::applyAcrossEdge().
|
inline |
Access an adjacent face id. The eid value must be 0..3.
Definition at line 259 of file Ptexture.h.
References adjfaces.
Referenced by PtexSeparableFilter::applyAcrossEdge(), PtexTriangleFilter::applyAcrossEdge(), PtexSeparableFilter::splitAndApply(), and PtexTriangleFilter::splitAndApply().
|
inline |
Determine if face has edits in the file (by checking a flag).
Definition at line 268 of file Ptexture.h.
References flag_hasedits, and flags.
|
inline |
Determine if face is constant (by checking a flag).
Definition at line 262 of file Ptexture.h.
References flag_constant, and flags.
Referenced by PtexMainWriter::finish().
|
inline |
Determine if neighborhood of face is constant (by checking a flag).
Definition at line 265 of file Ptexture.h.
References flag_nbconstant, and flags.
|
inline |
Determine if face is a subface (by checking a flag).
Definition at line 271 of file Ptexture.h.
References flag_subface, and flags.
Referenced by PtexSeparableFilter::applyAcrossEdge(), PtexSeparableFilter::applyToCorner(), and PtexSeparableFilter::applyToCornerFace().
|
inline |
Set the adjedges data.
Definition at line 278 of file Ptexture.h.
References adjedges.
Referenced by FaceInfo().
|
inline |
Set the adjfaces data.
Definition at line 274 of file Ptexture.h.
References adjfaces.
Referenced by FaceInfo().
uint8_t Ptex::FaceInfo::adjedges |
Adjacent edges, 2 bits per edge.
Definition at line 231 of file Ptexture.h.
Referenced by adjedge(), and setadjedges().
int32_t Ptex::FaceInfo::adjfaces[4] |
Adjacent faces (-1 == no adjacent face).
Definition at line 233 of file Ptexture.h.
Referenced by adjface(), FaceInfo(), FaceInfo(), and setadjfaces().
uint8_t Ptex::FaceInfo::flags |
Flags.
Definition at line 232 of file Ptexture.h.
Referenced by hasEdits(), isConstant(), isNeighborhoodConstant(), and isSubface().
Res Ptex::FaceInfo::res |
Resolution of face.
Definition at line 230 of file Ptexture.h.
Referenced by PtexSeparableFilter::apply(), PtexTriangleFilter::apply(), PtexPointFilter::eval(), PtexPointFilterTri::eval(), and PtexMainWriter::finish().