Visual Computing Library
All Classes Functions Variables Typedefs Enumerations Friends Modules Pages Concepts
vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT > Class Template Reference

The AdjacentFaces class is a container of Face indices or pointers. It could be used by any Element to save adjacencies information (also the Face element itself). More...

#include <vclib/mesh/components/adjacent_faces.h>

Inheritance diagram for vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >:

Public Types

using AdjacentFaceType = Face
 Expose the type of the Adjacent Face.
 
using AdjacentFaceIterator = Base::Iterator
 
using ConstAdjacentFaceIterator = Base::ConstIterator
 
using ConstAdjacentFaceIndexIterator = Base::ConstIndexIterator
 

Public Member Functions

 AdjacentFaces ()=default
 Empty constructor.
 
uint adjFacesNumber () const
 Returns the number of adjacent faces of this element.
 
FaceadjFace (uint i)
 Returns the pointer to the i-th adjacent face of this element.
 
const FaceadjFace (uint i) const
 Returns a const pointer to the i-th adjacent face of this element.
 
uint adjFaceIndex (uint i) const
 Returns the index in the face container of the i-th adjacent face of the element.
 
FaceadjFaceMod (int i)
 Returns the pointer to the i-th adjacent face of this element but using as index the module between i and the number of adjacent faces.
 
const FaceadjFaceMod (int i) const
 Same of adjFaceMod, but returns a const Pointer to the adjacent face.
 
uint adjFaceIndexMod (int i) const
 Returns the index in the face container of the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to get the "index of the adjacent face next to position k", without check if it is less than the number of adjacent faces. Works also for negative numbers:
 
void setAdjFace (uint i, Face *f)
 Sets the i-th adjacent face of this element.
 
void setAdjFace (uint i, uint fi)
 Sets the i-th adjacent face of the element.
 
void setAdjFace (ConstAdjacentFaceIterator it, Face *f)
 Sets the adjacent face pointed by the iterator.
 
void setAdjFace (ConstAdjacentFaceIterator it, uint fi)
 Sets the adjacent face pointed by the iterator.
 
void setAdjFace (ConstAdjacentFaceIndexIterator it, Face *f)
 Sets the adjacent face pointed by the iterator.
 
void setAdjFace (ConstAdjacentFaceIndexIterator it, uint fi)
 Sets the adjacent face pointed by the iterator.
 
void setAdjFaceMod (int i, Face *f)
 Sets the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to set the "next adjacent face after position k", without check if it is less than the number of adjacent faces. Works also for negative numbers:
 
void setAdjFaceMod (int i, uint fi)
 Sets the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to set the "next adjacent face after position k", without check if it is less than the number of adjacent faces. Works also for negative numbers:
 
template<Range Rng>
requires InputRange<Rng, Face*>
void setAdjFaces (Rng &&r)
 Sets all the adjacent faces of this element.
 
template<Range Rng>
requires InputRange<Rng, uint>
void setAdjFaces (Rng &&r)
 Sets all the adjacent faces of this element.
 
bool containsAdjFace (const Face *f) const
 Returns true if the container of adjacent faces contains the given face, false otherwise.
 
bool containsAdjFace (uint fi) const
 Returns true if the container of adjacent faces contains the face with the given index, false otherwise.
 
uint indexOfAdjFace (const Face *f) const
 Returns the index of the given adjacent face in the container of this element. If the given adjacent face is not in the container, returns UINT_NULL.
 
uint indexOfAdjFace (uint fi) const
 Returns the index of the adjacent face with the given index in the container of this element. If the adjacent face with the given index is not in the container, returns UINT_NULL.
 
void resizeAdjFaces (uint n)
 Resize the container of the adjacent faces to the given size.
 
void pushAdjFace (Face *f)
 Pushes in the back of the container the given adjacent face.
 
void pushAdjFace (uint fi)
 Pushes in the back of the container the given adjacent face.
 
void insertAdjFace (uint i, Face *f)
 Inserts the given adjacent face in the container at the given position.
 
void insertAdjFace (uint i, uint fi)
 Inserts the adjacent face with the given index in the container at the given position.
 
void eraseAdjFace (uint i)
 Removes the adjacent face at the given position from the container.
 
void clearAdjFaces ()
 Clears the container of adjacent faces, making it empty.
 
AdjacentFaceIterator adjFaceBegin ()
 Returns an iterator to the first adjacent face in the container of this component.
 
AdjacentFaceIterator adjFaceEnd ()
 Returns an iterator to the end of the container of this component.
 
ConstAdjacentFaceIterator adjFaceBegin () const
 Returns a const iterator to the first adjacent face in the container of this component.
 
ConstAdjacentFaceIterator adjFaceEnd () const
 Returns a const iterator to the end of the container of this component.
 
ConstAdjacentFaceIndexIterator adjFaceIndexBegin () const
 Returns an iterator to the first adjacent face index in the container of this component.
 
ConstAdjacentFaceIndexIterator adjFaceIndexEnd () const
 Returns an iterator to the end of the container of this component.
 
View< AdjacentFaceIterator > adjFaces ()
 Returns a lightweight view object that stores the begin and end iterators of the container of adjacent faces of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:
 
View< ConstAdjacentFaceIterator > adjFaces () const
 Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent faces of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:
 
View< ConstAdjacentFaceIndexIterator > adjFaceIndices () const
 Returns a lightweight view object that stores the begin and end iterators of the container of adjacent face indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:
 
void __adjacentFaces () const
 

Static Public Attributes

static const int ADJ_FACE_NUMBER = Base::SIZE
 Static size of the container. If the container is dynamic, this value will be negative and you should use the adjFacesNumber() member function.
 

Protected Member Functions

template<typename Element >
void importFrom (const Element &e, bool importRefs=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::ReferenceContainerComponent< STORE_INDICES, DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN >
uint size () const
 
Elemelement (uint i)
 
const Elemelement (uint i) const
 
uint elementIndex (uint i) const
 
ElemelementMod (int i)
 
const ElemelementMod (int i) const
 
uint elementIndexMod (int i) const
 
void setElement (uint i, Elem *e)
 
void setElement (uint i, uint ei)
 
void setElement (Base::ConstIterator it, Elem *v)
 
void setElement (Base::ConstIterator it, uint vi)
 
void setElement (Base::ConstIndexIterator it, Elem *v)
 
void setElement (Base::ConstIndexIterator it, uint vi)
 
void setElementMod (int i, Elem *e)
 
void setElementMod (int i, uint ei)
 
template<Range Rng>
requires InputRange<Rng, Elem*>
void setElements (Rng &&r)
 
template<Range Rng>
requires InputRange<Rng, uint>
void setElements (Rng &&r)
 
bool containsElement (const Elem *e) const
 
bool containsElement (uint ei) const
 
uint indexOfElement (const Elem *e) const
 
uint indexOfElement (uint ei) const
 
Base::Iterator elementBegin ()
 
Base::Iterator elementEnd ()
 
Base::ConstIterator elementBegin () const
 
Base::ConstIterator elementEnd () const
 
Base::ConstIndexIterator elementIndexBegin () const
 
Base::ConstIndexIterator elementIndexEnd () const
 
View< typename Base::Iterator > elements ()
 
View< typename Base::ConstIterator > elements () const
 
View< typename Base::ConstIndexIterator > elementIndices () const
 
void resize (uint n)
 
void pushBack (Elem *e=nullptr)
 
void pushBack (uint ei)
 
void insert (uint i, Elem *e=nullptr)
 
void insert (uint i, uint ei)
 
void erase (uint i)
 
void clear ()
 
uint indexFromPointer (const Elem *v) const
 
ElemelemFromParent (uint vi)
 
const ElemelemFromParent (uint vi) const
 

Private Types

using Base = ReferenceContainerComponent< STORE_INDICES, AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >, CompId::ADJACENT_FACES, Face, N, ParentElemType, VERT, OPT, TTVN >
 

Private Member Functions

template<typename Element >
void importIndicesFrom (const Element &e)
 

Additional Inherited Members

- Protected Types inherited from vcl::comp::ReferenceContainerComponent< STORE_INDICES, DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN >
using Base = std::conditional_t< STORE_INDICES, IndexContainerComponent< DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN >, PointerContainerComponent< DerivedComponent, COMP_ID, Elem, N, ParentElemType, VERT, OPT, TTVN > >
 

Detailed Description

template<bool STORE_INDICES, typename Face, int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
class vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >

The AdjacentFaces class is a container of Face indices or pointers. It could be used by any Element to save adjacencies information (also the Face element itself).

It is a random access container having static or dynamic size, depending on the value of N (a negative number means dynamic).

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 that has the AdjacentFaces component, you'll be able to access to this component member functions from v:

v.adjFacesNumber();
auto* f = v.adjFace(0);
uint vi = v.adjFaceIndex(0);
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Note
This component could be Tied To Vertex Number: it means that the size of the container, if dynamic, will change automatically along the Vertex Number of the Component. Check the TTVN template value on the specialization of your component to check if it is tied to the Vertex Number. For further details check the documentation of the ContainerComponent class.
Template Parameters
STORE_INDICESIf true, the component will store indices, otherwise pointers to Face.
FaceThe type of the adjacent Face element.
NThe size of the container, that will represent the number of storable adjacent faces. If negative, the container is dynamic.
TTVNIf true, the size of the container will be tied to the Vertex Number of the component (this is used mostly on Face elements).
ParentElemTypeThis type is used to get access to the Element that has the component (and, in case, to the Mesh that has the Element). If the component doesn't need to access the Element, this type can be void. Note: if the component is vertical (or optional), this type cannot be void.
VERTIf true, the component will be stored vertically. This argument is considered only if the ElementType is not void.
OPTIf true, the component will be optional. This argument is considered only if the component is stored vertically.

Constructor & Destructor Documentation

◆ AdjacentFaces()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::AdjacentFaces ( )
default

Empty constructor.

If the Adjacent Faces container size is static, initializes all the Adjacent Faces to nullptr, otherwise the container will be empty.

Member Function Documentation

◆ adjFace() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
Face * vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFace ( uint  i)
inline

Returns the pointer to the i-th adjacent face of this element.

Parameters
[in]ithe position of the required adjacent face in this container; the value must be between 0 and the number of adj faces.
Returns
The pointer to the i-th adjacent face of this element.

◆ adjFace() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
const Face * vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFace ( uint  i) const
inline

Returns a const pointer to the i-th adjacent face of this element.

Parameters
[in]ithe position of the required adjacent face in this container; the value must be between 0 and the number of adj faces.
Returns
The pointer to the i-th adjacent face of this element.

◆ adjFaceBegin() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
AdjacentFaceIterator vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceBegin ( )
inline

Returns an iterator to the first adjacent face in the container of this component.

Returns
an iterator pointing to the begin of this container.

◆ adjFaceBegin() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentFaceIterator vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceBegin ( ) const
inline

Returns a const iterator to the first adjacent face in the container of this component.

Returns
an iterator pointing to the begin of this container.

◆ adjFaceEnd() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
AdjacentFaceIterator vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceEnd ( )
inline

Returns an iterator to the end of the container of this component.

Returns
an iterator pointing to the end of this container.

◆ adjFaceEnd() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentFaceIterator vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceEnd ( ) const
inline

Returns a const iterator to the end of the container of this component.

Returns
an iterator pointing to the end of this container.

◆ adjFaceIndex()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceIndex ( uint  i) const
inline

Returns the index in the face container of the i-th adjacent face of the element.

Parameters
[in]ithe position of the required face in this container.
Returns
The index of the i-th adjacent face of the element.

◆ adjFaceIndexBegin()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentFaceIndexIterator vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceIndexBegin ( ) const
inline

Returns an iterator to the first adjacent face index in the container of this component.

Returns
an iterator pointing to the begin of the adjacent face indices.

◆ adjFaceIndexEnd()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
ConstAdjacentFaceIndexIterator vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceIndexEnd ( ) const
inline

Returns an iterator to the end of the container of this component.

Returns
an iterator pointing to the end of the adjacent face indices.

◆ adjFaceIndexMod()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceIndexMod ( int  i) const
inline

Returns the index in the face container of the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to get the "index of the adjacent face next to position k", without check if it is less than the number of adjacent faces. Works also for negative numbers:

k = pos; // some position of an adjacent face
auto idx = e.adjFaceIndexMod(k+1); // the index of the adjacent face next
// to k, that may also be at pos 0
auto lastIdx = e.adjFaceIndexMod(-1); // the index of the adjacent face
// in position adjFacesNumber()-1
Parameters
[in]ithe position of the required adjacent face in this container, w.r.t. the position 0; value is modularized on adjFacesNumber().
Returns
The index of the required adjacent face of the element.

◆ adjFaceIndices()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
View< ConstAdjacentFaceIndexIterator > vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceIndices ( ) const
inline

Returns a lightweight view object that stores the begin and end iterators of the container of adjacent face indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:

// Do something with adj face index...
}
View< ConstAdjacentFaceIndexIterator > adjFaceIndices() const
Returns a lightweight view object that stores the begin and end iterators of the container of adjacen...
Definition adjacent_faces.h:602
Returns
a lightweight view object that can be used in range-based for loops to iterate over adjacent face indices.

◆ adjFaceMod() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
Face * vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceMod ( int  i)
inline

Returns the pointer to the i-th adjacent face of this element but using as index the module between i and the number of adjacent faces.

You can use this function if you need to get the "next adjacent face after position k", without check if it is less than the number of adj faces. Works also for negative numbers:

k = pos; // some position of an adjacent face
auto* next = e.adjFaceMod(k+1); // the adj face next to k, that may also
// be at pos 0
auto* last = e.adjFaceMod(-1); // the adj face in position
// adjFacesNumber()-1
Parameters
[in]ithe position of the required adjacent face in this container, w.r.t. the position 0; value is modularized on adjFacesNumber().
Returns
The pointer to the required adjacent face of this element.

◆ adjFaceMod() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
const Face * vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaceMod ( int  i) const
inline

Same of adjFaceMod, but returns a const Pointer to the adjacent face.

Parameters
[in]ithe position of the required adjacent face in this container, w.r.t. the position 0; value is modularized on adjFacesNumber().
Returns
The pointer to the required adjacent face of this element.

◆ adjFaces() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
View< AdjacentFaceIterator > vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaces ( )
inline

Returns a lightweight view object that stores the begin and end iterators of the container of adjacent faces of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:

for (auto* adjFace : el.adjFaces()) {
// Do something with adjFace
}
View< AdjacentFaceIterator > adjFaces()
Returns a lightweight view object that stores the begin and end iterators of the container of adjacen...
Definition adjacent_faces.h:563
Face * adjFace(uint i)
Returns the pointer to the i-th adjacent face of this element.
Definition adjacent_faces.h:161
Returns
a lightweight view object that can be used in range-based for loops to iterate over adjacent faces.

◆ adjFaces() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
View< ConstAdjacentFaceIterator > vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFaces ( ) const
inline

Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent faces of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops:

for (const auto* adjFace : el.adjFaces()) {
// Do something read-only with adjFace
}
Returns
a lightweight view object that can be used in range-based for loops to iterate over adjacent faces.

◆ adjFacesNumber()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::adjFacesNumber ( ) const
inline

Returns the number of adjacent faces of this element.

Returns
The number of adjacent faces of this element.

◆ clearAdjFaces()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::clearAdjFaces ( )
inline

Clears the container of adjacent faces, making it empty.

Note
This function is available only if the container of the Adjacent Faces component has dynamic size.

◆ containsAdjFace() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
bool vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::containsAdjFace ( const Face f) const
inline

Returns true if the container of adjacent faces contains the given face, false otherwise.

Parameters
[in]fthe pointer to the face to search.
Returns
true if the container of adjacent faces contains the given face, false otherwise.

◆ containsAdjFace() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
bool vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::containsAdjFace ( uint  fi) const
inline

Returns true if the container of adjacent faces contains the face with the given index, false otherwise.

Parameters
[in]fithe index of the face to search.
Returns
true if the container of adjacent faces contains the face with the given index, false otherwise.

◆ eraseAdjFace()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::eraseAdjFace ( uint  i)
inline

Removes the adjacent face at the given position from the container.

Note
This function is available only if the container of the Adjacent Faces component has dynamic size.
Parameters
[in]iThe position of the adjacent face to remove from this container.

◆ indexOfAdjFace() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::indexOfAdjFace ( const Face f) const
inline

Returns the index of the given adjacent face in the container of this element. If the given adjacent face is not in the container, returns UINT_NULL.

Parameters
[in]fthe pointer to the adjacent face to search.
Returns
the index of the given adjacent face, or UINT_NULL if it is not found.

◆ indexOfAdjFace() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
uint vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::indexOfAdjFace ( uint  fi) const
inline

Returns the index of the adjacent face with the given index in the container of this element. If the adjacent face with the given index is not in the container, returns UINT_NULL.

Parameters
[in]fithe index of the adjacent face to search.
Returns
the index of the adjacent face with the given index, or UINT_NULL if it is not found.

◆ insertAdjFace() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::insertAdjFace ( uint  i,
Face f 
)
inline

Inserts the given adjacent face in the container at the given position.

Note
This function is available only if the container of the Adjacent Faces component has dynamic size.
Parameters
[in]iThe position in this container where to insert the adjacent face.
[in]fThe pointer to the adjacent face to insert in the container.

◆ insertAdjFace() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::insertAdjFace ( uint  i,
uint  fi 
)
inline

Inserts the adjacent face with the given index in the container at the given position.

Note
This function is available only if the container of the Adjacent Faces component has dynamic size.
Parameters
[in]iThe position in this container where to insert the adjacent face.
[in]fiThe index to the adjacent face to insert in the container.

◆ pushAdjFace() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::pushAdjFace ( Face f)
inline

Pushes in the back of the container the given adjacent face.

Note
This function is available only if the container of the Adjacent Faces component has dynamic size.
Parameters
[in]fThe pointer to the adjacent face to push in the back of the container.

◆ pushAdjFace() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::pushAdjFace ( uint  fi)
inline

Pushes in the back of the container the given adjacent face.

Note
This function is available only if the container of the Adjacent Faces component has dynamic size.
Parameters
[in]fiThe index to the adjacent face to push in the back of the container.

◆ resizeAdjFaces()

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::resizeAdjFaces ( uint  n)
inline

Resize the container of the adjacent faces to the given size.

Note
This function is available only if the container of the Adjacent Faces is has dynamic size.
Parameters
[in]nThe new size of the adjacent faces container.

◆ setAdjFace() [1/6]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFace ( ConstAdjacentFaceIndexIterator  it,
Face f 
)
inline

Sets the adjacent face pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent face; the value must be between begin() and end().
[in]fThe pointer to the adjacent face to set to the element.

◆ setAdjFace() [2/6]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFace ( ConstAdjacentFaceIndexIterator  it,
uint  fi 
)
inline

Sets the adjacent face pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent face; the value must be between begin() and end().
[in]fiThe index in the face container of the face to set.

◆ setAdjFace() [3/6]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFace ( ConstAdjacentFaceIterator  it,
Face f 
)
inline

Sets the adjacent face pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent face; the value must be between begin() and end().
[in]fThe pointer to the adjacent face to set to the element.

◆ setAdjFace() [4/6]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFace ( ConstAdjacentFaceIterator  it,
uint  fi 
)
inline

Sets the adjacent face pointed by the iterator.

Parameters
[in]itthe iterator in this container on which set the adjacent face; the value must be between begin() and end().
[in]fiThe index in the face container of the face to set.

◆ setAdjFace() [5/6]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFace ( uint  i,
Face f 
)
inline

Sets the i-th adjacent face of this element.

Parameters
[in]ithe position in this container on which set the adj face; the value must be between 0 and the number of adj faces.
[in]fThe pointer to the adjacent face to set to this element.

◆ setAdjFace() [6/6]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFace ( uint  i,
uint  fi 
)
inline

Sets the i-th adjacent face of the element.

Parameters
[in]ithe position in this container on which set the adj face; the value must be between 0 and the number of adj faces.
[in]fiThe index in the face container of the face to set.

◆ setAdjFaceMod() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFaceMod ( int  i,
Face f 
)
inline

Sets the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to set the "next adjacent face after position k", without check if it is less than the number of adjacent faces. Works also for negative numbers:

k = pos; // some position of an adj face
e.setAdjFaceMod(k+1, aFace); // set the adj face next to k, that may also
// be at pos 0
e.setAdjFaceMod(-1, aFace); // set the adj face in position
// adjFacesNumber()-1
Parameters
[in]ithe position in this container w.r.t. the position 0 on which set the adj face; value is modularized on adjFacesNumber().
[in]fThe pointer to the adj face to set to the element.

◆ setAdjFaceMod() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFaceMod ( int  i,
uint  fi 
)
inline

Sets the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to set the "next adjacent face after position k", without check if it is less than the number of adjacent faces. Works also for negative numbers:

k = pos; // some position of an adj face
e.setAdjFaceMod(k+1, aFaceInd); // set the adj face next to k, that may
// also be at pos 0
e.setAdjFaceMod(-1, aFaceInd); // set the adj face in position
// adjFacesNumber()-1
Parameters
[in]ithe position in this container w.r.t. the position 0 on which set the adj face; value is modularized on adjFacesNumber().
[in]fiThe index in the face containrt of the face to set.

◆ setAdjFaces() [1/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
template<Range Rng>
requires InputRange<Rng, Face*>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFaces ( Rng &&  r)
inline

Sets all the adjacent faces of this element.

If the size of the container is static, the size of the input range must be the same one of the container.

Template Parameters
RngThe type of the range of adjacent faces to set. The value type of the range must be convertible to a pointer to an AdjacentFace.
Parameters
[in]rrange of face pointers to set.

◆ setAdjFaces() [2/2]

template<bool STORE_INDICES, typename Face , int N, bool TTVN, typename ParentElemType = void, bool VERT = false, bool OPT = false>
template<Range Rng>
requires InputRange<Rng, uint>
void vcl::comp::AdjacentFaces< STORE_INDICES, Face, N, TTVN, ParentElemType, VERT, OPT >::setAdjFaces ( Rng &&  r)
inline

Sets all the adjacent faces of this element.

If the size of the container is static, the size of the input range must be the same one of the container.

Template Parameters
RngThe type of the range of adjacent faces to set. The value type of the range must be convertible to an unsigned integer.
Parameters
[in]rrange of face indices to set.

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