|
| PolygonBitFlags () |
| Initializes all the bits to false .
|
|
bool | deleted () const |
| Returns whether the current Polygon is deleted or not.
|
|
BitProxy< FT > | selected () |
| Accesses the 'selected' bit of this Polygon, returning a reference to it.
|
|
bool | selected () const |
| Returns whether the current Polygon is selected or not.
|
|
BitProxy< FT > | visited () |
| Accesses the 'visited' bit of this Polygon, returning a reference to it.
|
|
bool | visited () const |
| Returns whether the current Polygon has been visited or not.
|
|
bool | onBorder () const |
| Returns whether the current Polygon is on border or not, by checking whether at least one of its edges are on border or not.
|
|
BitProxy< FT > | edgeOnBorder (uint i) |
| Accesses the 'onBorder' bit of the i-th edge of the polygon, returning a reference to it.
|
|
bool | edgeOnBorder (uint i) const |
| Returns whether the i-th edge of the current Polygon is on border or not.
|
|
BitProxy< FT > | edgeSelected (uint i) |
| Accesses the 'selected' bit of the i-th edge of the polygon, returning a reference to it.
|
|
bool | edgeSelected (uint i) const |
| Returns whether the i-th edge of the current Polygon is selected or not.
|
|
BitProxy< FT > | edgeVisited (uint i) |
| Accesses the 'visited' bit of the i-th edge of the polygon, returning a reference to it.
|
|
bool | edgeVisited (uint i) const |
| Returns whether the i-th edge of the current Polygon has been visited or not.
|
|
BitProxy< FT > | edgeFaux (uint i) |
| Accesses the 'faux' bit of the i-th edge of the polygon, returning a reference to it.
|
|
bool | edgeFaux (uint i) const |
| Returns whether the i-th edge of the current Polygon is faux or not.
|
|
bool | userBit (uint bit) const |
| Returns the boolean value of the user bit of this Polygon given in input. The bit is checked to be less than the total number of assigned user bits, which in this class is 2.
|
|
BitProxy< FT > | userBit (uint bit) |
| Returns a reference to the value of the user bit of this Polygon given in input. The bit is checked to be less than the total number of assigned user bits, which in this class is 2.
|
|
bool | edgeUserBit (uint i, uint bit) const |
| Returns the boolean value of the user bit of the i-th edge of this Polygon given in input. The bit is checked to be less than the total number of assigned edge user bits, which in this class is 5.
|
|
BitProxy< FT > | edgeUserBit (uint i, uint bit) |
| Returns a reference to the value of the user bit of the i-th edge of this Polygon given in input. The bit is checked to be less than the total number of assigned edge user bits, which in this class is 5.
|
|
void | resetBitFlags () |
| Unsets all the flags of this Polygon and sets them to false , except the deleted flag, which needs to be manually reset.
|
|
void | importFlagsFromVCGFormat (int f) |
| Sets all the flags of this element to the values contained in the integer input parameter, that represents the bit flags of the VCG library.
|
|
int | exportFlagsToVCGFormat () const |
| Returns the bit flags of this element in the format of the VCG library.
|
|
void | __polygonBitFlags () const |
|
The PolygonBitFlags class represents a collection of 8 bits plus 8 bits for each edge that will be part of a generic Polygonal Face of a Mesh.
This is a specialization class of the BitFlags component, meaning that it can be used in sostitution to that component. The difference is that this class is meant to be used on Polygonal Faces, and adds bits with particular meanings for polygons.
This class also provides 3 flags for faux edges. These flags are added just to make portable all the algorithms that use faux flags also for PolygonMeshes. However, these flags should be used only when the mesh is a Triangle mesh, that is when each face has vertexNumber() == 3.
The bits have the follwing meaning:
- 0: deleted: if the current Polygon has been deleted - read only
- 1: selected: if the current Polygon has been selected
- 2: visited: if the current Polygon has been visited (useful for some visit algorithms)
- from 3 to 5: edge faux: if the current Face has is i-th edge (i in [0, 2]) marked as faux
- from 6 to 7: user bits that can have custom meanings to the user
This class provides 2 user bits, that can be accessed using the member function userBit(uint i) with position in the interval [0, 1].
Additionally, this class provides the following bits for each edge of the Polygonal Face:
- 0: edge border: if the current Polygonal face has the i-th edge on border
- 1: edge selection: if the current Polygonal face has the i-th edge selected
- 2: edge visited: if the i-th edge of the current Polygonal face has been visited
- from 3 to 7: user bits of the i-th edge that can have custo meanings to the user
The member functions of this class will be available in the instance of any Element that will contain this component.
For example, if you have a Face Element f
that has the PolygonBitFlags component, you'll be able to access to this component member functions from f
:
- Note
- This component is Tied To Vertex Number: it means that the size of the container, if dynamic, will change automatically along the Vertex Number of the Component. For further details check the documentation of the ContainerComponent class.
- Template Parameters
-
N | The size of the container, that will represent the number of storable bit flags for each edge of the Polygon. If negative, the container is dynamic and tied to the vertex number. |
ParentElemType | This template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically. |
OPT | If true, the component will be optional. This argument is considered only if the component is stored vertically. |