Visual Computing Library
|
The Face class represents an Face element of the vcl::Mesh class. More...
#include <vclib/mesh/elements/face.h>
Public Types | |
using | VertexType = typename VRefs::VertexType |
![]() | |
using | ParentMeshType = MeshType |
using | Components = FilterTypesByCondition< comp::IsComponentPred, TypeWrapper< Comps... > >::type |
Components is an alias to a vcl::TypeWrapper that wraps all the types from which the Element inherits (Comps) that are Components (they satisfy the ComponentConcept). | |
![]() | |
using | ParentMeshType = MeshType |
Public Member Functions | |
Face ()=default | |
Empty constructor. | |
template<Range Rng> requires (InputRange<Rng, VertexType*> || InputRange<Rng, uint>) | |
void | setVertices (Rng &&r) |
Sets all the Vertices to the face. | |
template<typename... V> requires ( (std::convertible_to<V, VertexType*> || std::convertible_to<V, uint>) && ...) | |
void | setVertices (V... args) |
Sets a list of Vertices to the face. | |
void | resizeVertices (uint n) |
Resize the number of Vertex Pointers of the Face, taking care of updating also the other components of the Face that are tied to that number. | |
void | pushVertex (VertexType *v) |
void | pushVertex (uint vi) |
void | insertVertex (uint i, VertexType *v) |
void | insertVertex (uint i, uint vi) |
void | eraseVertex (uint i) |
void | clearVertices () |
template<typename ElType > | |
void | importFrom (const ElType &v, bool importRefs=true) |
![]() | |
uint | index () const |
auto & | component () |
const auto & | component () const |
void | importFrom (const ElType &v, bool importRefs=true) |
void | serialize (std::ostream &out) const |
void | deserialize (std::istream &in) |
![]() | |
ParentMeshPointer (const ParentMeshPointer< MeshType > &) | |
ParentMeshPointer (ParentMeshPointer< MeshType > &&) | |
ParentMeshPointer & | operator= (const ParentMeshPointer< MeshType > &) |
constexpr MeshType * | parentMesh () |
constexpr const MeshType * | parentMesh () const |
Private Types | |
using | Base = Element< ElemId::FACE, MeshType, Comps... > |
using | VRefs = typename Face::VertexReferences |
Private Member Functions | |
template<typename Comp > | |
void | resizeTTVNComponent (uint n) |
template<typename Comp > | |
void | pushBackTTVNComponent () |
template<typename Comp > | |
void | insertTTVNComponent (uint i) |
template<typename Comp > | |
void | eraseTTVNComponent (uint i) |
template<typename Comp > | |
void | clearTTVNComponent () |
Static Private Attributes | |
static const int | NV = VRefs::VERTEX_NUMBER |
Additional Inherited Members | |
![]() | |
static const uint | ELEMENT_ID |
![]() | |
void | setParentMesh (void *parentMesh) |
The Face class represents an Face element of the vcl::Mesh class.
Using the FaceContainer class, it is possible to add a vector of Face elements to a mesh, and manage them with the member functions exposed by the FaceContainer. Each Face element exposes all the member functions of its Component types.
MeshType | The type of the parent mesh. |
Comps | The types of the components of the element. |
Empty constructor.
Calls automatically all the empty constructors of all the components available in the Face (for all the components non-available, their empty constructor is called only when they become available).
|
inlineprivate |
Calls the clear() on all the component containers that are tied to the vertex number
|
inlineprivate |
Calls the erase(i) on all the component containers that are tied to the vertex number
|
inlineprivate |
Calls the insert(i) on all the component containers that are tied to the vertex number
|
inlineprivate |
Calls the pushBack() on all the component containers that are tied to the vertex number
|
inlineprivate |
Calls the resize(n) on all the component containers that are tied to the vertex number
|
inline |
Resize the number of Vertex Pointers of the Face, taking care of updating also the other components of the Face that are tied to that number.
If n is greater than the old number of vertex pointers, n vertex pointers (and relative tied components) will be added. If n is lower than the old number of vertex pointers, the difference of vertex pointers (and relative tied components) will be removed.
This member function is available only if the face is polygonal (its size is dynamic, N < 0).
n | the new number of vertices. |
|
inline |
Sets all the Vertices to the face.
If the Face size is static, the number of vertices of the input range must be equal to the size of the Face (the value returned by vertexNumber()). If the Face size is dynamic, it will take care to update the also the size of the components tied to the vertex number of the face.
Rng | A range of vertex pointers or vertex indices in counterclockwise order. |
[in] | r | a range of vertex pointers or vertex indices in counterclockwise order that will be set as vertices of the face. |
|
inline |
Sets a list of Vertices to the face.
If the Face size is static, the number of vertices of the list must be equal to the size of the Face (the value returned by vertexNumber()). If the Face size is dynamic, it will take care to update the also the size of the components tied to the vertex number of the face.
V | A list of vertex pointers or vertex indices in counterclockwise order. |
[in] | args | a variable number of vertex pointers or vertex indices in counterclockwise order that will be set as vertices of the face. |