Ptex: Ptex::FaceInfo Struct Reference

Ptex

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes | List of all members
Ptex::FaceInfo Struct Reference

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, sets all members to zero. More...
| FaceInfo (Res res_)
| Constructor. More...
| FaceInfo (Res res_, int adjfaces_[4], int adjedges_[4], bool isSubface_=false)
| Constructor. More...
EdgeId | adjedge (int eid) const
| Access an adjacent edge id. The eid value must be 0..3. More...
int | adjface (int eid) const
| Access an adjacent face id. The eid value must be 0..3. More...
bool | isConstant () const
| Determine if face is constant (by checking a flag). More...
bool | isNeighborhoodConstant () const
| Determine if neighborhood of face is constant (by checking a flag). More...
bool | hasEdits () const
| Determine if face has edits in the file (by checking a flag). More...
bool | isSubface () const
| Determine if face is a subface (by checking a flag). More...
void | setadjfaces (int f0, int f1, int f2, int f3)
| Set the adjfaces data. More...
void | setadjedges (int e0, int e1, int e2, int e3)
| Set the adjedges data. More...

## Public Attributes
Res | res
| Resolution of face. More...
uint8_t | adjedges
| Adjacent edges, 2 bits per edge. More...
uint8_t | flags
| Flags. More...
int32_t | adjfaces [4]
| Adjacent faces (-1 == no adjacent face). More...

## Detailed Description

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 237 of file Ptexture.h.

## Member Enumeration Documentation

anonymous enum

Flag bit values (for internal use).

Enumerator
flag_constant |
flag_hasedits |
flag_nbconstant |
flag_subface |

Definition at line 290 of file Ptexture.h.

## Constructor & Destructor Documentation

Ptex::FaceInfo::FaceInfo | ( |  | ) |
| inline

Default constructor, sets all members to zero.

Definition at line 244 of file Ptexture.h.

Ptex::FaceInfo::FaceInfo | ( | Res | res_ | ) |
| inline

Constructor.

Definition at line 250 of file Ptexture.h.

Ptex::FaceInfo::FaceInfo | ( | Res | res_,
|  | int | adjfaces_[4],
|  | int | adjedges_[4],
|  | bool | isSubface_ = `false`
| ) |  |
| inline

Constructor.

Definition at line 256 of file Ptexture.h.

## Member Function Documentation

EdgeId Ptex::FaceInfo::adjedge | ( | int | eid | ) | const
| inline

Access an adjacent edge id. The eid value must be 0..3.

Definition at line 264 of file Ptexture.h.

Referenced by PtexTriangleFilter::applyAcrossEdge(), PtexSeparableFilter::applyAcrossEdge(), PtexSeparableFilter::applyToCorner(), PtexReader::blendFaces(), and PtexMainWriter::flagConstantNeighorhoods().

int Ptex::FaceInfo::adjface | ( | int | eid | ) | const
| inline

Access an adjacent face id. The eid value must be 0..3.

Definition at line 267 of file Ptexture.h.

Referenced by PtexTriangleFilter::applyAcrossEdge(), PtexSeparableFilter::applyAcrossEdge(), PtexSeparableFilter::applyToCorner(), PtexMainWriter::flagConstantNeighorhoods(), PtexTriangleFilter::splitAndApply(), and PtexSeparableFilter::splitAndApply().

bool Ptex::FaceInfo::hasEdits | ( |  | ) | const
| inline

Determine if face has edits in the file (by checking a flag).

Definition at line 276 of file Ptexture.h.

Referenced by PtexReader::getData().

bool Ptex::FaceInfo::isConstant | ( |  | ) | const
| inline

Determine if face is constant (by checking a flag).

Definition at line 270 of file Ptexture.h.

References flag_constant.

Referenced by PtexMainWriter::finish(), PtexMainWriter::flagConstantNeighorhoods(), PtexMainWriter::generateReductions(), PtexReader::getData(), and PtexReader::readEditFaceData().

bool Ptex::FaceInfo::isNeighborhoodConstant | ( |  | ) | const
| inline

Determine if neighborhood of face is constant (by checking a flag).

Definition at line 273 of file Ptexture.h.

References flag_nbconstant.

Referenced by PtexSeparableFilter::eval(), and PtexTriangleFilter::eval().

bool Ptex::FaceInfo::isSubface | ( |  | ) | const
| inline

Determine if face is a subface (by checking a flag).

Definition at line 279 of file Ptexture.h.

Referenced by PtexSeparableFilter::applyAcrossEdge(), PtexSeparableFilter::applyToCorner(), PtexSeparableFilter::applyToCornerFace(), PtexSeparableFilter::eval(), and PtexMainWriter::flagConstantNeighorhoods().

void Ptex::FaceInfo::setadjedges | ( | int | e0,
|  | int | e1,
|  | int | e2,
|  | int | e3
| ) |  |
| inline

Set the adjedges data.

Definition at line 286 of file Ptexture.h.

Referenced by OneValueInv().

void Ptex::FaceInfo::setadjfaces | ( | int | f0,
|  | int | f1,
|  | int | f2,
|  | int | f3
| ) |  |
| inline

Set the adjfaces data.

Definition at line 282 of file Ptexture.h.

Referenced by OneValueInv().

## Member Data Documentation

uint8_t Ptex::FaceInfo::adjedges

Adjacent edges, 2 bits per edge.

Definition at line 239 of file Ptexture.h.

Referenced by PtexWriterBase::storeFaceInfo().

int32_t Ptex::FaceInfo::adjfaces[4]

Adjacent faces (-1 == no adjacent face).

Definition at line 241 of file Ptexture.h.

Referenced by PtexReader::blendFaces(), and PtexWriterBase::storeFaceInfo().

uint8_t Ptex::FaceInfo::flags

Flags.

Definition at line 240 of file Ptexture.h.

Referenced by PtexMainWriter::flagConstantNeighorhoods(), PtexReader::readEditFaceData(), and PtexWriterBase::storeFaceInfo().

Res Ptex::FaceInfo::res

Resolution of face.

Definition at line 238 of file Ptexture.h.

Referenced by PtexTriangleFilter::apply(), PtexSeparableFilter::apply(), PtexSeparableFilter::eval(), PtexTriangleFilter::eval(), PtexMainWriter::finish(), PtexMainWriter::generateReductions(), PtexReader::getData(), PtexWriterBase::storeFaceInfo(), PtexMainWriter::writeFace(), and PtexIncrWriter::writeFace().

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

- Ptexture.h