Visual Computing Library
Loading...
Searching...
No Matches
vcl::TriEdgeMeshT< Scalar, INDEXED > Class Template Reference

The TriEdgeMeshT class is a mesh class that represents a triangle mesh with edges. More...

Inheritance diagram for vcl::TriEdgeMeshT< Scalar, INDEXED >:

Public Types

using ScalarType = Scalar
 The scalar used to store all the data of the Mesh.
 
- Public Types inherited from vcl::mesh::VertexContainer< T >
using Vertex = T
 
using VertexType = T
 
using VertexIterator = Base::ElementIterator
 
using ConstVertexIterator = Base::ConstElementIterator
 
- Public Types inherited from vcl::mesh::FaceContainer< T >
using Face = T
 
using FaceType = T
 
using FaceIterator = Base::ElementIterator
 
using ConstFaceIterator = Base::ConstElementIterator
 
- Public Types inherited from vcl::mesh::EdgeContainer< T >
using Edge = T
 
using EdgeType = T
 
using EdgeIterator = Base::ElementIterator
 
using ConstEdgeIterator = Base::ConstElementIterator
 
- Public Types inherited from vcl::comp::BoundingBox< PointType, ParentElemType, OPT >
using BoundingBoxType = Box< PointType >
 Expose the type of the bounding box.
 
- Public Types inherited from vcl::comp::Color< ParentElemType, OPT >
using ColorType = vcl::Color
 Expose the type of the Color.
 
- Public Types inherited from vcl::comp::TextureImages
using TextureType = Texture
 Expose the type of the Texture.
 
using TextureIterator = std::vector< Texture >::iterator
 
using ConstTextureIterator = std::vector< Texture >::const_iterator
 
using TexFileNamesIterator = decltype(std::declval< detail::TData >().pathBegin())
 
using ConstTexFileNamesIterator = decltype(std::declval< const detail::TData >().pathBegin())
 
- Public Types inherited from vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >
using TransformMatrixType = Matrix44< Scalar >
 Expose the type of the transform matrix.
 
- Public Types inherited from vcl::Mesh< mesh::VertexContainer< triedgemesh::Vertex< Scalar, INDEXED > >, mesh::FaceContainer< triedgemesh::Face< Scalar, INDEXED > >, mesh::EdgeContainer< triedgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Color, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
using Containers = FilterTypesByCondition< mesh::IsElementContainerPred, TypeWrapper< Args... > >::type
 Containers is a vcl::TypeWrapper that wraps all the types from which the Mesh inherits (Args) that are ElementContainers (they satisfy the ElementContainerConcept).
 
using Components = FilterTypesByCondition< comp::IsComponentPred, TypeWrapper< Args... > >::type
 Components is an alias to a vcl::TypeWrapper that wraps all the types from which the Mesh inherits (Args) that are Components (they satisfy the ComponentConcept).
 
using ContainerType = ContainerOfElement< ELEM_ID >::type
 ContainerType is an alias that exposes the type of the Container that stores the Element identified by the template parameter ELEM_ID.
 
using ElementType = ContainerType< ELEM_ID >::ElementType
 ElementType is an alias that exposes the type of the Element identified by the template parameter ELEM_ID.
 

Additional Inherited Members

- Public Member Functions inherited from vcl::mesh::VertexContainer< T >
 VertexContainer ()=default
 Empty constructor that creates an empty container of Vertices.
 
const VertexType & vertex (uint i) const
 Returns a const reference of the vertex at the i-th position in the Vertex Container of the Mesh, which will be the vertex having index = i.
 
VertexType & vertex (uint i)
 Returns a reference of the vertex at the i-th position in the Vertex Container of the Mesh, which will be the vertex having index = i.
 
uint vertexNumber () const
 Returns the number of non-deleted vertices contained in the Vertex container of the Mesh.
 
uint vertexContainerSize () const
 Returns the number of vertices (also deleted) contained in the Vertex container of the Mesh.
 
uint deletedVertexNumber () const
 Returns the number of deleted vertices in the Vertex container, that is vertexContainerSize() - vertexNumber().
 
uint addVertex ()
 Add a new vertex into the vertex container, returning the index of the added vertex.
 
uint addVertex (const typename T::CoordType &p)
 Add a new vertex with the given coordinate into the vertex container, returning the id of the added vertex.
 
uint addVertices (uint n)
 Add an arbitrary number of n vertices, returning the id of the first added vertex.
 
template<typename... VC>
uint addVertices (const typename T::CoordType &p, const VC &... v)
 Add an arbitrary number of vertices with the given coordinates, returning the id of the first added vertex.
 
template<vcl::Range R>
requires RangeOf<R, typename T::CoordType>
uint addVertices (R &&range)
 Add an arbitrary number of vertices with the coordinates contained in the given range, returning the id of the first added vertex.
 
void clearVertices ()
 Clears the Vertex container of the Mesh, deleting all the vertices.
 
void resizeVertices (uint n)
 Resizes the Vertex container to contain n vertices.
 
void reserveVertices (uint n)
 Reserve a number of vertices in the container of Vertices. This is useful when you know (or you have an idea) of how much vertices are going to add into a newly or existing mesh. Calling this function before any add_vertex() call will avoid unuseful reallocations of the container, saving execution time.
 
void compactVertices ()
 Compacts the Vertex Container, removing all the vertices marked as deleted. Vertices indices will change accordingly. The function will automatically take care of updating all the Vertex pointers contained in the Mesh.
 
void deleteVertex (uint i)
 Marks as deleted the vertex with the given id.
 
void deleteVertex (const VertexType *v)
 Marks as deleted the given vertex, before asserting that the vertex belongs to this container.
 
uint vertexIndexIfCompact (uint i) const
 This is an utility member function that returns the index of an element if the container would be compact, that is the number of non-deleted elements before the vertex with the given index.
 
std::vector< uintvertexCompactIndices () const
 Returns a vector that tells, for each actual vertex index, the new index that the vertex would have in a compacted container. For each deleted vertex index, the value of the vector will be UINT_NULL.
 
void updateVertexIndices (const std::vector< uint > &newIndices)
 Updates all the indices and pointers of the vertices of this container that are stored in any container of the mesh, according to the mapping stored in the newIndices vector, that tells for each old vertex index, the new vertex index.
 
VertexIterator vertexBegin (bool jumpDeleted=true)
 Returns an iterator to the beginning of the container.
 
VertexIterator vertexEnd ()
 Returns an iterator to the end of the container.
 
ConstVertexIterator vertexBegin (bool jumpDeleted=true) const
 Returns a const iterator to the beginning of the container.
 
ConstVertexIterator vertexEnd () const
 Returns a const iterator to the end of the container.
 
auto vertices (bool jumpDeleted=true)
 Returns a small utility object that allows to iterate over the vertices of the containers, providing two member functions begin() and end().
 
auto vertices (bool jumpDeleted=true) const
 Returns a small utility object that allows to iterate over the vertices of the containers, providing two member functions begin() and end().
 
void enableAllPerVertexOptionalComponents ()
 Enables all the optional components associated to the Vertex type contained in the VertexContainer.
 
void disableAllPerVertexOptionalComponents ()
 Disables all the optional components associated to the Vertex type contained in the VertexContainer.
 
bool isPerVertexAdjacentEdgesEnabled () const
 Checks if the vertex Optional Adjacent Edges component is enabled.
 
void enablePerVertexAdjacentEdges ()
 Enables the Optional Adjacent Edges of the vertex.
 
void disablePerVertexAdjacentEdges ()
 Disables the Optional Adjacent Edges of the vertex.
 
bool isPerVertexAdjacentFacesEnabled () const
 Checks if the vertex Optional Adjacent Faces component is enabled.
 
void enablePerVertexAdjacentFaces ()
 Enables the Optional Adjacent Faces of the vertex.
 
void disablePerVertexAdjacentFaces ()
 Disables the Optional Adjacent Faces of the vertex.
 
bool isPerVertexAdjacentVerticesEnabled () const
 Checks if the vertex Optional Adjacent Vertices component is enabled.
 
void enablePerVertexAdjacentVertices ()
 Enables the Optional Adjacent Vertices of the vertex.
 
void disablePerVertexAdjacentVertices ()
 Disables the Optional Adjacent Vertices of the vertex.
 
bool isPerVertexColorEnabled () const
 Checks if the vertex Optional Color is enabled.
 
void enablePerVertexColor ()
 Enables the Optional Color of the vertex.
 
void disablePerVertexColor ()
 Disables the Optional Color of the vertex.
 
bool isPerVertexMarkEnabled () const
 Checks if the vertex Optional Mark is enabled.
 
void enablePerVertexMark ()
 Enables the Optional Mark of the vertex.
 
void disablePerVertexMark ()
 Container::disableVertexMark disables the Optional Mark of the vertex.
 
bool isPerVertexNormalEnabled () const
 Checks if the vertex Optional Normal is enabled.
 
void enablePerVertexNormal ()
 Enables the Optional Normal of the vertex.
 
void disablePerVertexNormal ()
 Checks if the vertex Optional PrincipalCurvature is enabled.
 
bool isPerVertexPrincipalCurvatureEnabled () const
 Checks if the vertex Optional PrincipalCurvature is enabled.
 
void enablePerVertexPrincipalCurvature ()
 Enables the Optional PrincipalCurvature of the vertex.
 
void disablePerVertexPrincipalCurvature ()
 Disables the Optional PrincipalCurvature of the vertex.
 
bool isPerVertexQualityEnabled () const
 Checks if the vertex Optional Quality is enabled.
 
void enablePerVertexQuality ()
 Enables the Optional Quality of the vertex.
 
void disablePerVertexQuality ()
 Disables the Optional Quality of the vertex.
 
bool isPerVertexTexCoordEnabled () const
 Checks if the vertex Optional TexCoord is enabled.
 
void enablePerVertexTexCoord ()
 Enables the Optional TexCoord of the vertex.
 
void disablePerVertexTexCoord ()
 Disables the Optional TexCoord of the vertex.
 
bool hasPerVertexCustomComponent (const std::string &name) const
 Checks if vertices have a custom component with the given name.
 
std::vector< std::string > perVertexCustomComponentNames () const
 Returns a vector containing all the names of the custom components of any type associated to the Vertex Element.
 
template<typename K >
requires vert::HasCustomComponents<T>
bool isPerVertexCustomComponentOfType (const std::string &name) const
 Checks if the custom component of the Vertex Element having the given name has the same type of the given template argument type of this function.
 
std::type_index perVertexCustomComponentType (const std::string &name) const
 Returns the std::type_index of the custom component of the Vertex Element having the given input name.
 
template<typename K >
requires vert::HasCustomComponents<T>
std::vector< std::string > perVertexCustomComponentNamesOfType () const
 Returns a vector containing all the names of the custom components associated to the Vertex Element having the same type of the given template argument type of this function.
 
template<typename K >
requires vert::HasCustomComponents<T>
void addPerVertexCustomComponent (const std::string &name)
 Adds a custom component of type K to the Vertex, having the given name.
 
void deletePerVertexCustomComponent (const std::string &name)
 Deletes the custom component of the given name from the Vertex Element.
 
template<typename K >
requires vert::HasCustomComponents<T>
CustomComponentVectorHandle< K > perVertexCustomComponentVectorHandle (const std::string &name)
 Returns a vector handle to the custom component having the type K and the given name.
 
template<typename K >
requires vert::HasCustomComponents<T>
ConstCustomComponentVectorHandle< K > perVertexCustomComponentVectorHandle (const std::string &name) const
 Returns a const vector handle to the custom component having type K and the given name.
 
- Public Member Functions inherited from vcl::mesh::FaceContainer< T >
 FaceContainer ()=default
 Empty constructor that creates an empty container of Faces.
 
const FaceType & face (uint i) const
 Returns a const reference of the Face at the i-th position in the Face Container of the Mesh, which will be the Face having index = i.
 
FaceType & face (uint i)
 Returns a reference of the Face at the i-th position in the Face Container of the Mesh, which will be the Face having index = i.
 
uint faceNumber () const
 Returns the number of non-deleted Faces contained in the Face container of the Mesh.
 
uint faceContainerSize () const
 Returns the number of Faces (also deleted) contained in the Face container of the Mesh.
 
uint deletedFaceNumber () const
 Returns the number of deleted Faces in the Face container, that is faceContainerSize() - faceNumber().
 
uint addFace ()
 Add a Face to the container, returning its index.
 
template<typename... V>
requires (sizeof...(args) >= 3)
uint addFace (V... args)
 
template<Range Rng>
requires ( InputRange<Rng, typename Face::VertexType*> || InputRange<Rng, uint>)
uint addFace (Rng &&r)
 
uint addFaces (uint n)
 Add an arbitrary number of n Faces, returning the id of the first added Face.
 
void clearFaces ()
 Clears the Face container of the Mesh, deleting all the Faces.
 
void resizeFaces (uint n)
 Resizes the Face container to contain n Faces.
 
void reserveFaces (uint n)
 Reserve a number of Faces in the container of Faces. This is useful when you know (or you have an idea) of how much Faces are going to add into a newly of existing mesh. Calling this function before any addFace() call will avoid unuseful reallocations of the container, saving execution time.
 
void compactFaces ()
 Compacts the FaceContainer, removing all the Faces marked as deleted. Faces indices will change accordingly. The function will automatically take care of updating all the Face pointers contained in the Mesh.
 
void deleteFace (uint i)
 Marks as deleted the Face with the given id.
 
void deleteFace (const FaceType *f)
 Marks as deleted the given Face, before asserting that the Face belongs to this container.
 
uint faceIndexIfCompact (uint i) const
 This is an utility member function that returns the index of an element if the container would be compact, that is the number of non-deleted elements before the Face with the given index.
 
std::vector< uintfaceCompactIndices () const
 Returns a vector that tells, for each actual Face index, the new index that the Face would have in a compacted container. For each deleted Face index, the value of the vector will be UINT_NULL.
 
void updateFaceIndices (const std::vector< uint > &newIndices)
 Updates all the indices and pointers of the Faces of this container that are stored in any container of the mesh, according to the mapping stored in the newIndices vector, that tells for each old Face index, the new Face index.
 
FaceIterator faceBegin (bool jumpDeleted=true)
 Returns an iterator to the beginning of the container.
 
FaceIterator faceEnd ()
 Returns an iterator to the end of the container.
 
ConstFaceIterator faceBegin (bool jumpDeleted=true) const
 Returns a const iterator to the beginning of the container.
 
ConstFaceIterator faceEnd () const
 Returns a const iterator to the end of the container.
 
auto faces (bool jumpDeleted=true)
 Returns a small view object that allows to iterate over the Faces of the containers, providing two member functions begin() and end().
 
auto faces (bool jumpDeleted=true) const
 Returns a small view object that allows to iterate over the Faces of the containers, providing two member functions begin() and end().
 
void enableAllPerFaceOptionalComponents ()
 Enables all the optional components associated to the Face type contained in the FaceContainer.
 
void disableAllPerFaceOptionalComponents ()
 Disables all the optional components associated to the Face type contained in the FaceContainer.
 
bool isPerFaceAdjacentEdgesEnabled () const
 Checks if the Face Optional AdjacentEdges is enabled.
 
void enablePerFaceAdjacentEdges ()
 Enable the Optional AdjacentEdges of the Face.
 
void disablePerFaceAdjacentEdges ()
 Disables the Optional AdjacentEdges of the Face.
 
bool isPerFaceAdjacentFacesEnabled () const
 Checks if the Face Optional AdjacentFaces is enabled.
 
void enablePerFaceAdjacentFaces ()
 Enable the Optional AdjacentFaces of the Face.
 
void disablePerFaceAdjacentFaces ()
 Disables the Optional AdjacentFaces of the Face.
 
bool isPerFaceColorEnabled () const
 Checks if the Face Optional Color is enabled.
 
void enablePerFaceColor ()
 Enable the Optional Color of the Face.
 
void disablePerFaceColor ()
 Disables the Optional Color of the Face.
 
bool isPerFaceMarkEnabled () const
 Checks if the Face Optional Mark is enabled.
 
void enablePerFaceMark ()
 Enable the Optional Mark of the Face.
 
void disablePerFaceMark ()
 Disables the Optional Mark of the Face.
 
bool isPerFaceNormalEnabled () const
 Checks if the Face Optional Normal is enabled.
 
void enablePerFaceNormal ()
 Enable the Optional Normal of the Face.
 
void disablePerFaceNormal ()
 Disables the Optional Normal of the Face.
 
bool isPerFacePrincipalCurvatureEnabled () const
 Checks if the Face Optional PrincipalCurvature is enabled.
 
void enablePerFacePrincipalCurvature ()
 Enable the Optional PrincipalCurvature of the Face.
 
void disablePerFacePrincipalCurvature ()
 Disables the Optional PrincipalCurvature of the Face.
 
bool isPerFaceQualityEnabled () const
 Checks if the Face Optional Quality is enabled.
 
void enablePerFaceQuality ()
 Enable the Optional Quality of the Face.
 
void disablePerFaceQuality ()
 Disables the Optional Quality of the Face.
 
bool isPerFaceWedgeColorsEnabled () const
 Checks if the Face Optional WedgeColors is enabled.
 
void enablePerFaceWedgeColors ()
 Enable the Optional WedgeColors of the Face.
 
void disablePerFaceWedgeColors ()
 Disables the Optional WedgeColors of the Face.
 
bool isPerFaceWedgeTexCoordsEnabled () const
 Checks if the Face Optional WedgeTexCoords is enabled.
 
void enablePerFaceWedgeTexCoords ()
 Enable the Optional WedgeTexCoords of the Face.
 
void disablePerFaceWedgeTexCoords ()
 Disables the Optional WedgeTexCoords of the Face.
 
bool hasPerFaceCustomComponent (const std::string &name) const
 Checks if Faces have a custom component with the given name.
 
std::vector< std::string > perFaceCustomComponentNames () const
 Returns a vector containing all the names of the custom components of any type associated to the Face Element.
 
template<typename K >
requires face::HasCustomComponents<T>
bool isPerFaceCustomComponentOfType (const std::string &name) const
 Checks if the custom component of the Face Element having the given name has the same type of the given template argument type of this function.
 
std::type_index perFaceCustomComponentType (const std::string &name) const
 Returns the std::type_index of the custom component of the Face Element having the given input name.
 
template<typename K >
requires face::HasCustomComponents<T>
std::vector< std::string > perFaceCustomComponentNamesOfType () const
 Returns a vector containing all the names of the custom components associated to the Edge Element having the same type of the given template argument type of this function.
 
template<typename K >
requires face::HasCustomComponents<T>
void addPerFaceCustomComponent (const std::string &name)
 Adds a custom component of type K to the Face, having the given name.
 
void deletePerFaceCustomComponent (const std::string &name)
 Deletes the custom component of the given name from the Face Element.
 
template<typename K >
requires face::HasCustomComponents<T>
CustomComponentVectorHandle< K > perFaceCustomComponentVectorHandle (const std::string &name)
 Returns a vector handle to the custom component having the type K and the given name.
 
template<typename K >
requires face::HasCustomComponents<T>
ConstCustomComponentVectorHandle< K > perFaceCustomComponentVectorHandle (const std::string &name) const
 Returns a const vector handle to the custom component having type K and the given name.
 
- Public Member Functions inherited from vcl::mesh::EdgeContainer< T >
 EdgeContainer ()=default
 Empty constructor that creates an empty container of Edges.
 
const EdgeType & edge (uint i) const
 Returns a const reference of the Edge at the i-th position in the Edge Container of the Mesh, which will be the Edge having index = i.
 
EdgeType & edge (uint i)
 Returns a reference of the Edge at the i-th position in the Edge Container of the Mesh, which will be the Edge having index = i.
 
uint edgeNumber () const
 Returns the number of non-deleted Edges contained in the Edge container of the Mesh.
 
uint edgeContainerSize () const
 Returns the number of Edges (also deleted) contained in the Edge container of the Mesh.
 
uint deletedEdgeNumber () const
 Returns the number of deleted Edges in the Edge container, that is edgeContainerSize() - edgeNumber().
 
uint addEdge ()
 Add an Edge to the container, returning its index.
 
uint addEdge (uint v0, uint v1)
 Add an Edge having the two given vertices to the container, returning its index.
 
uint addEdge (typename T::VertexType *v0, typename T::VertexType *v1)
 Add an Edge having the two given vertices to the container, returning its index.
 
uint addEdges (uint n)
 Add an arbitrary number of n Edges, returning the id of the first added Edge.
 
void clearEdges ()
 Clears the Edge container of the Mesh, deleting all the Edges.
 
void resizeEdges (uint n)
 Resizes the Edge container to contain n Edges.
 
void reserveEdges (uint n)
 Reserve a number of Edges in the container of Edges. This is useful when you know (or you have an idea) of how much Edges are going to add into a newly of existing mesh. Calling this function before any addEdge() call will avoid unuseful reallocations of the container, saving execution time.
 
void compactEdges ()
 Compacts the EdgeContainer, removing all the Edges marked as deleted. Edges indices will change accordingly. The function will automatically take care of updating all the Edge pointers contained in the Mesh.
 
void deleteEdge (uint i)
 Marks as deleted the Edge with the given id.
 
void deleteEdge (const EdgeType *e)
 Marks as deleted the given Edge, before asserting that the Edge belongs to this container.
 
uint edgeIndexIfCompact (uint i) const
 This is an utility member function that returns the index of an element if the container would be compact, that is the number of non-deleted elements before the Edge with the given index.
 
std::vector< uintedgeCompactIndices () const
 Returns a vector that tells, for each actual Edge index, the new index that the Edge would have in a compacted container. For each deleted Edge index, the value of the vector will be UINT_NULL.
 
void updateEdgeIndices (const std::vector< uint > &newIndices)
 Updates all the indices and pointers of the Edges of this container that are stored in any container of the mesh, according to the mapping stored in the newIndices vector, that tells for each old Edge index, the new Edge index.
 
EdgeIterator edgeBegin (bool jumpDeleted=true)
 Returns an iterator to the beginning of the container.
 
EdgeIterator edgeEnd ()
 Returns an iterator to the end of the container.
 
ConstEdgeIterator edgeBegin (bool jumpDeleted=true) const
 Returns a const iterator to the beginning of the container.
 
ConstEdgeIterator edgeEnd () const
 Returns a const iterator to the end of the container.
 
auto edges (bool jumpDeleted=true)
 Returns a small view object that allows to iterate over the Edges of the containers, providing two member functions begin() and end().
 
auto edges (bool jumpDeleted=true) const
 Returns a small view object that allows to iterate over the Edges of the containers, providing two member functions begin() and end().
 
void enableAllPerEdgeOptionalComponents ()
 Enables all the optional components associated to the Edge type contained in the EdgeContainer.
 
void disableAllPerEdgeOptionalComponents ()
 Disables all the optional components associated to the Edge type contained in the EdgeContainer.
 
bool isPerEdgeAdjacentEdgesEnabled () const
 Checks if the Edge Optional AdjacentEdges is enabled.
 
void enablePerEdgeAdjacentEdges ()
 Enable the Optional AdjacentEdges of the Edge.
 
void disablePerEdgeAdjacentEdges ()
 Disables the Optional AdjacentEdges of the Edge.
 
bool isPerEdgeAdjacentFacesEnabled () const
 Checks if the Edge Optional AdjacentFaces is enabled.
 
void enablePerEdgeAdjacentFaces ()
 Enable the Optional AdjacentFaces of the Edge.
 
void disablePerEdgeAdjacentFaces ()
 Disables the Optional AdjacentFaces of the Edge.
 
bool isPerEdgeColorEnabled () const
 Checks if the Edge Optional Color is enabled.
 
void enablePerEdgeColor ()
 Enable the Optional Color of the Edge.
 
void disablePerEdgeColor ()
 Disables the Optional Color of the Edge.
 
bool isPerEdgeMarkEnabled () const
 Checks if the Edge Optional Mark is enabled.
 
void enablePerEdgeMark ()
 Enable the Optional Mark of the Edge.
 
void disablePerEdgeMark ()
 Disables the Optional Mark of the Edge.
 
bool isPerEdgeQualityEnabled () const
 Checks if the Edge Optional Quality is enabled.
 
void enablePerEdgeQuality ()
 Enable the Optional Quality of the Edge.
 
void disablePerEdgeQuality ()
 Disables the Optional Quality of the Edge.
 
bool hasPerEdgeCustomComponent (const std::string &name) const
 Checks if Edges have a custom component with the given name.
 
std::vector< std::string > perEdgeCustomComponentNames () const
 Returns a vector containing all the names of the custom components of any type associated to the Edge Element.
 
template<typename K >
requires edge::HasCustomComponents<T>
bool isPerEdgeCustomComponentOfType (const std::string &name) const
 Checks if the custom component of the Edge Element having the given name has the same type of the given template argument type of this function.
 
std::type_index perEdgeCustomComponentType (const std::string &name) const
 Returns the std::type_index of the custom component of the Edge Element having the given input name.
 
template<typename K >
requires edge::HasCustomComponents<T>
std::vector< std::string > perEdgeCustomComponentNamesOfType () const
 Returns a vector containing all the names of the custom components associated to the Edge Element having the same type of the given template argument type of this function.
 
template<typename K >
requires edge::HasCustomComponents<T>
void addPerEdgeCustomComponent (const std::string &name)
 Adds a custom component of type K to the Edge, having the given name.
 
void deletePerEdgeCustomComponent (const std::string &name)
 Deletes the custom component of the given name from the Edge Element.
 
template<typename K >
requires edge::HasCustomComponents<T>
CustomComponentVectorHandle< K > perEdgeCustomComponentVectorHandle (const std::string &name)
 Returns a vector handle to the custom component having the type K and the given name.
 
template<typename K >
requires edge::HasCustomComponents<T>
ConstCustomComponentVectorHandle< K > perEdgeCustomComponentVectorHandle (const std::string &name) const
 Returns a const vector handle to the custom component having type K and the given name.
 
- Public Member Functions inherited from vcl::comp::BoundingBox< PointType, ParentElemType, OPT >
 BoundingBox ()=default
 Initilizes the bounding box to an invalid bounding box.
 
const BoundingBoxTypeboundingBox () const
 Returns a const reference to the bounding box of this object.
 
BoundingBoxTypeboundingBox ()
 Returns a reference to the bounding box of this object.
 
- Public Member Functions inherited from vcl::comp::Color< ParentElemType, OPT >
 Color ()=default
 Initilizes the color to black (with alpha 255).
 
const vcl::Colorcolor () const
 Returns a const reference of the color of the element.
 
vcl::Colorcolor ()
 Returns a reference pf the color of the element.
 
- Public Member Functions inherited from vcl::comp::Mark< ParentElemType, OPT >
 Mark ()
 Constructor that initializes the mark to 0.
 
int mark () const
 Returns the value of the mark.
 
void resetMark ()
 Resets the mark to 0.
 
template<typename E >
bool hasSameMark (const E &e) const
 Checks if the current element/mesh has the same mark of the given input element/mesh e.
 
void incrementMark ()
 Increments the mark of the current element/mesh by 1.
 
void decrementMark ()
 Decrements the mark of the current element/mesh by 1.
 
- Public Member Functions inherited from vcl::comp::Name< ParentElemType, OPT >
 Name ()=default
 Initilizes an empty name.
 
std::string & name ()
 Returns the name of this object.
 
const std::string & name () const
 Returns the name of this object.
 
- Public Member Functions inherited from vcl::comp::TextureImages
 TextureImages ()=default
 Initializes the component with an empty vector of textures and an empty string as mesh base path.
 
uint textureNumber () const
 Returns the number of texture of the mesh.
 
const Texturetexture (uint i) const
 Returns the i-th texture of the mesh. The path of the texture is relative to the mesh base path.
 
Texturetexture (uint i)
 Returns a reference to the i-th texture of the mesh. The path of the texture is relative to the mesh base path.
 
const std::string & texturePath (uint i) const
 Returns the path of the i-th texture of the mesh. The path is relative to the mesh base path.
 
std::string & texturePath (uint i)
 Returns a reference to the path of the i-th texture of the mesh. The path is relative to the mesh base path.
 
const std::string & meshBasePath () const
 Returns the mesh base path.
 
std::string & meshBasePath ()
 Returns a reference to the mesh base path.
 
void clearTextures ()
 Clears the vector of textures.
 
void clearTexturePaths ()
 Clears the vector of textures.
 
void pushTexture (const Texture &texture)
 Adds a texture to the vector of textures.
 
void pushTexturePath (const std::string &textPath)
 Adds a texture to the vector of textures. The image of the texture is left empty.
 
TextureIterator textureBegin ()
 Returns an iterator to the beginning of the vector of textures.
 
TextureIterator textureEnd ()
 Returns an iterator to the end of the vector of textures.
 
ConstTextureIterator textureBegin () const
 Returns a const iterator to the beginning of the vector of textures.
 
ConstTextureIterator textureEnd () const
 Returns a const iterator to the end of the vector of textures.
 
TexFileNamesIterator texturePathBegin ()
 Returns an iterator to the beginning of the vector of texture paths.
 
TexFileNamesIterator texturePathEnd ()
 Returns an iterator to the end of the vector of texture paths.
 
ConstTexFileNamesIterator texturePathBegin () const
 Returns a const iterator to the beginning of the vector of texture paths.
 
ConstTexFileNamesIterator texturePathEnd () const
 Returns a const iterator to the end of the vector of texture paths.
 
View< TextureIterator > textures ()
 Returns a lightweigth view object that stores the begin and end iterators of the vector of textures. 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< ConstTextureIterator > textures () const
 Returns a lightweigth const view object that stores the begin and end iterators of the vector of textures. 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:
 
auto texturePaths ()
 Returns a lightweigth view object that stores the begin and end iterators of the vector of texture paths. 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:
 
auto texturePaths () const
 Returns a lightweigth const view object that stores the begin and end iterators of the vector of texture paths. 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:
 
- Public Member Functions inherited from vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >
 TransformMatrix ()
 Initializes the transform matrix to identity.
 
const TransformMatrixTypetransformMatrix () const
 Returns a const reference to the transform matrix.
 
TransformMatrixTypetransformMatrix ()
 Returns a reference to the transform matrix.
 
- Public Member Functions inherited from vcl::comp::CustomComponents< ParentElemType >
 CustomComponents ()=default
 Initilizes an empty container of custom components.
 
bool hasCustomComponent (const std::string &compName) const
 Returns true if the element has a custom component with the given name, false otherwise. The type of the custom component is not checked.
 
template<typename CompType >
bool isCustomComponentOfType (const std::string &compName) const
 Returns true if the custom component of the given name is of the type given as template argument, false otherwise.
 
std::type_index customComponentType (const std::string &compName) const
 Returns the std::type_index of the custom component of the given name.
 
template<typename CompType >
std::vector< std::string > customComponentNamesOfType () const
 Returns a std::vector of std::strings containing the names of the custom components of the type given as template argument.
 
template<typename CompType >
const CompTypecustomComponent (const std::string &compName) const
 Returns the const reference to the custom component of the given name having the type given as template argument.
 
template<typename CompType >
CompTypecustomComponent (const std::string &compName)
 Returns the reference to the custom component of the given name having the type given as template argument.
 
template<typename CompType >
requires (!IS_VERTICAL)
void addCustomComponent (const std::string &compName, const CompType &value=CompType())
 
void deleteCustomComponent (const std::string &compName)
 
- Public Member Functions inherited from vcl::Mesh< mesh::VertexContainer< triedgemesh::Vertex< Scalar, INDEXED > >, mesh::FaceContainer< triedgemesh::Face< Scalar, INDEXED > >, mesh::EdgeContainer< triedgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Color, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
 Mesh ()
 Empty constructor, constructs an empty mesh.
 
 Mesh (const Mesh &oth)
 Copy constructor of the Mesh. Will create a deep copy of the given input mesh, taking care of copying everithing and then update all the pointers.
 
 Mesh (Mesh &&oth)
 Move constructor, moves the given mesh into this one, without any other resource acquisition.
 
bool isCompact () const
 Returns true if this mesh is compact, meaning that all its containers have no deleted elements (size == element number).
 
void clear ()
 Clears all the Elements contained in the mesh.
 
void compact ()
 Compacts all the containers of the mesh.
 
void enableAllOptionalComponents ()
 Enables all the optional components of the elements of the containers if the mesh.
 
void disableAllOptionalComponents ()
 Disables all the optional components of the elements of the containers if the mesh.
 
void enableSameOptionalComponentsOf (const OtherMeshType &m)
 Enables all the OptionalComponents of this mesh according to the Components available on the OtherMeshType m.
 
void append (const Mesh &m)
 Appends all the elements contained in the mesh m to this mesh.
 
void importFrom (const OtherMeshType &m)
 Imports all the components that can be imported from another type of mesh.
 
void swap (Mesh &m2)
 Swaps this mesh with the other input Mesh m2.
 
Meshoperator= (Mesh oth)
 Assignment operator of the Mesh.
 
uint index (const El &e) const
 Returns the index of the given element in its Container of the Mesh.
 
uint index (const El *e) const
 Returns the index of the given element in its Container of the Mesh.
 
const autoelement (uint i) const
 Returns the element of the given type at the given index inside its container of this mesh.
 
autoelement (uint i)
 Returns the element of the given type at the given index inside its container of this mesh.
 
uint number () const
 Returns the number of elements of the given type in this mesh.
 
uint containerSize () const
 Returns the size of the container of elements of the given type in this mesh.
 
uint deletedNumber () const
 Returns the number of deleted elements of the given type in this mesh.
 
uint add ()
 Adds a new element of the given type into its container, returning the index of the added element in its container.
 
uint add (uint n)
 Adds n new elements of the given type into its container, returning the index of the first added element in its container.
 
void clearElements ()
 Clears the container of ELEM_ID elements the Mesh, deleting all the Elements.
 
void resize (uint n)
 Resizes the Element container to contain n Elements of type ELEM_ID.
 
void reserve (uint n)
 Reserves a number of elements of the given type in its container. The function does not add any element to the container, but it just reserves a number of elements that can be added without causing a reallocation of the container.
 
void compactElements ()
 Compacts the Container of the given element, removing all the elements marked as deleted. Element indices will change accordingly. The function will automatically take care of updating all the Element pointers contained in the Mesh.
 
void deleteElement (uint i)
 Marks as deleted the element at the given index from its container, deduced from the template index ELEM_ID.
 
void deleteElement (const El *e) const
 Marks as deleted the given element from its container.
 
void deleteElement (const El &e) const
 Marks as deleted the given element from its container.
 
std::vector< uintcompactIndices () const
 Returns a vector that tells, for each element of the container of ELEM_ID in the mesh, the new index of the element after the container has been compacted. For each deleted element, its position will be set to UINT_NULL.
 
void updateIndices (const std::vector< uint > &newIndices)
 Updates all the indices and pointers of the elements of the container of ELEM_ID in the mesh, according to the mapping stored in the newIndices vector, that tells for each old element index, the new index of the element in the same container (or UINT_NULL if the element must be left as unreferenced - useful when a vertex is deleted).
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
auto begin (bool jumpDeleted=true)
 Returns an iterator to the begining of the container of the elements having ID ELEM_ID in the mesh.
 
auto begin (bool jumpDeleted=true) const
 Returns a const iterator to the begining of the container of the elements having ID ELEM_ID in the mesh.
 
auto end ()
 Returns an iterator to the end of the container of the elements having ID ELEM_ID in the mesh.
 
auto end () const
 Returns a const iterator to the end of the container of the elements having ID ELEM_ID in the mesh.
 
auto elements (bool jumpDeleted=true)
 
auto elements (bool jumpDeleted=true) const
 
bool isPerElementComponentEnabled () const
 Returns true if optional Component having ID COMP_ID is enabled for elements having ID ELEM_ID in the mesh.
 
void enablePerElementComponent ()
 Enables the optional Component having ID COMP_ID for elements having ID ELEM_ID in the mesh.
 
void disablePerElementComponent ()
 Disables the optional Component having ID COMP_ID for elements having ID ELEM_ID in the mesh.
 
bool hasPerElementCustomComponent (const std::string &name) const
 Returns true if the Element having ID ELEM_ID has a custom component with the given name.
 
std::vector< std::string > perElementCustomComponentNames () const
 Returns a vector containing all the names of the custom components of any type associated to the Element having ID ELEM_ID.
 
bool isPerElementCustomComponentOfType (const std::string &name) const
 Returns true if the Element having ID ELEM_ID has a custom component of type K with the given name.
 
std::type_index perElementCustomComponentType (const std::string &name) const
 Returns the std::type_index of the custom component having the given name associated to the Element having ID ELEM_ID.
 
std::vector< std::string > perElementCustomComponentNamesOfType () const
 Returns a vector containing all the names of the custom components of type K associated to the Element having ID ELEM_ID.
 
void addPerElementCustomComponent (const std::string &name)
 Adds a custom component of type K having the given name to the Element having ID ELEM_ID.
 
void deletePerElementCustomComponent (const std::string &name)
 Deletes the custom component of the given name from the Element having ID ELEM_ID.
 
CustomComponentVectorHandle< K > perElementCustomComponentVectorHandle (const std::string &name)
 Returns a vector handle to the custom component of type K having the given name associated to the Element having ID ELEM_ID.
 
ConstCustomComponentVectorHandle< K > perElementCustomComponentVectorHandle (const std::string &name) const
 Returns a const vector handle to the custom component of type K having the given name associated to the Element having ID ELEM_ID.
 
- Static Public Member Functions inherited from vcl::Mesh< mesh::VertexContainer< triedgemesh::Vertex< Scalar, INDEXED > >, mesh::FaceContainer< triedgemesh::Face< Scalar, INDEXED > >, mesh::EdgeContainer< triedgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Color, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
static constexpr bool hasContainerOf ()
 Returns true if this Mesh has a container of elements having the same Element ID of the template Element El.
 
static constexpr bool hasContainerOf ()
 Returns true if this Mesh has a container of elements having the same Element ID of the template ELEM_ID.
 
static constexpr bool hasPerElementComponent ()
 Returns true if this Mesh has a container of elements having the same Element ID of the template ELEM_ID and the Element of that container has a Component having the same Component ID of the template COMP_ID.
 
static constexpr bool hasPerElementOptionalComponent ()
 Returns true if this Mesh has a container of elements having the same Element ID of the template ELEM_ID and the Element of that container has an Optional Component having the same Component ID of the template COMP_ID.
 
- Static Public Attributes inherited from vcl::comp::CustomComponents< ParentElemType >
static const uint COMPONENT_ID = CompId::CUSTOM_COMPONENTS
 The ID of component.
 
- Protected Member Functions inherited from vcl::mesh::FaceContainer< T >
template<typename OthMesh >
void manageImportTriFromPoly (const OthMesh &m)
 This function manages the case where we try to import into a TriMesh a PolyMesh Faces have been already imported, but without vertex pointers and other components that depend on the number of vertices (e.g. wedges)
 
- Protected Member Functions inherited from vcl::comp::BoundingBox< PointType, ParentElemType, OPT >
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::Color< ParentElemType, OPT >
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::Mark< ParentElemType, OPT >
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::Name< ParentElemType, OPT >
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::TextureImages
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::comp::CustomComponents< ParentElemType >
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 
- Protected Member Functions inherited from vcl::Mesh< mesh::VertexContainer< triedgemesh::Vertex< Scalar, INDEXED > >, mesh::FaceContainer< triedgemesh::Face< Scalar, INDEXED > >, mesh::EdgeContainer< triedgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Color, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
bool isContainerCompact () const
 
void compactContainer ()
 
void enableAllOptionalComponentsInContainer ()
 
void disableAllOptionalComponentsInContainer ()
 
void clearContainer ()
 
void updateAllReferences (const Element *oldBase)
 
void updateAllReferences (const std::vector< uint > &newIndices)
 
void updateReferences (const Element *oldBase, TypeWrapper< A... >)
 
void updateReferences (const Element *oldBase)
 
void updateReferences (const Element *oldBase, TypeWrapper< A... >, const std::array< std::size_t, N > &sizes=std::array< std::size_t, 0 >(), uint offset=0)
 
void updateReferences (const Element *oldBase, const std::array< std::size_t, N > &sizes=std::array< std::size_t, 0 >(), uint offset=0)
 
void updateReferences (const std::vector< uint > &newIndices)
 

Detailed Description

template<typename Scalar, bool INDEXED>
class vcl::TriEdgeMeshT< Scalar, INDEXED >

The TriEdgeMeshT class is a mesh class that represents a triangle mesh with edges.

It allows to store vertices, triangles and edges. Edges are separated from faces, and they are stored in a dedicated container.

Template Parameters
ScalarThe scalar type used for the mesh.
INDEXEDA boolean flag that indicates whether the mesh uses indices or pointers to store references.

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