|
| BitFlags () |
| Initializes the bits to false .
|
|
bool | deleted () const |
| Returns whether the current Element is deleted or not.
|
|
BitProxy< FT > | selected () |
| Accesses the 'selected' bit of this Element, returning a reference to it.
|
|
bool | selected () const |
| Returns whether the current Element is selected or not.
|
|
BitProxy< FT > | onBorder () |
| Accesses the 'onBorder' bit of this Element, returning a reference to it.
|
|
bool | onBorder () const |
| Returns whether the current Element is on border or not.
|
|
BitProxy< FT > | visited () |
| Accesses the 'visited' bit of this Element, returning a reference to it.
|
|
bool | visited () const |
| Returns whether the current Element has been visited or not.
|
|
bool | userBit (uint bit) const |
| Returns a reference to the value of the user bit of this Element given in input. The bit is checked to be less than the total number of assigned user bits, which in this class is 4.
|
|
BitProxy< FT > | userBit (uint bit) |
| Returns the boolean value of the user bit of this Element given in input. The bit is checked to be less than the total number of assigned user bits, which in this class is 4.
|
|
void | resetBitFlags () |
| Unsets all the flags of this Element 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.
|
|
The BitFlags component class represents a collection of 8 bits that will be part of an Element (e.g. Vertex, Face, ...).
This Component (or a specialization, that is any class that satisfies the HasBitFlags concept) is mandatory into every Element of the mesh.
The bits have the following meaning:
- 0: deleted: if the current Element has been deleted - read only
- 1: selected: if the current Element has been selected
- 2: border: if the current Element is on border
- 3: visited: if the current Element has been visited (useful for some visit algorithms)
- from 4 to 7: user bits that can have custom meanings to the user
This class provides 4 user bits, that can be accessed using the member function userBit(uint i) with position in the interval [0, 3].
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 Vertex Element v
with the BitFlags component, you'll be able to access to this component member functions from v
:
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
- Template Parameters
-
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. |