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

The EdgeMeshT class is a mesh class that represents a mesh that stores only vertices and edges (no faces). More...

Inheritance diagram for vcl::EdgeMeshT< 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 ConstVertexIterator = Base::ConstElementIterator
 
using Vertex = T
 
using VertexIterator = Base::ElementIterator
 
using VertexType = T
 
- Public Types inherited from vcl::mesh::EdgeContainer< T >
using ConstEdgeIterator = Base::ConstElementIterator
 
using Edge = T
 
using EdgeIterator = Base::ElementIterator
 
using EdgeType = T
 
- 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 ConstTexFileNamesIterator = decltype(std::declval< const detail::TData >().pathBegin())
 
using ConstTextureIterator = std::vector< Texture >::const_iterator
 
using TexFileNamesIterator = decltype(std::declval< detail::TData >().pathBegin())
 
using TextureIterator = std::vector< Texture >::iterator
 
using TextureType = Texture
 Expose the type of the Texture.
 
- 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< edgemesh::Vertex< Scalar, INDEXED > >, mesh::EdgeContainer< edgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
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 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 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 >
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.
 
uint addVertex ()
 Add a new vertex into the vertex container, returning the index of the added vertex.
 
uint addVertex (const typename T::PositionType &p)
 Add a new vertex with the given position into the vertex container, returning the id of the added vertex.
 
template<typename... VC>
uint addVertices (const typename T::PositionType &p, const VC &... v)
 Add an arbitrary number of vertices with the given positions, returning the id of the first added vertex.
 
template<vcl::Range R>
requires RangeOf<R, typename T::PositionType>
uint addVertices (R &&range)
 Add an arbitrary number of vertices with the positions contained in the given range, returning the id of the first added vertex.
 
uint addVertices (uint n)
 Add an arbitrary number of n vertices, returning the id of the first added vertex.
 
void clearVertices ()
 Clears the Vertex container of the Mesh, deleting all the vertices.
 
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.
 
uint deletedVertexNumber () const
 Returns the number of deleted vertices in the Vertex container, that is vertexContainerSize() - vertexNumber().
 
void deletePerVertexCustomComponent (const std::string &name)
 Deletes the custom component of the given name from the Vertex Element.
 
void deleteVertex (const VertexType *v)
 Marks as deleted the given vertex, before asserting that the vertex belongs to this container.
 
void deleteVertex (uint i)
 Marks as deleted the vertex with the given id.
 
template<typename K >
requires vert::HasCustomComponents<T>
void deserializePerVertexCustomComponentsOfType (std::istream &is)
 Deserializes in the given input stream all the custom components of the Vertex Element of type K.
 
void disableAllPerVertexOptionalComponents ()
 Disables all the optional components associated to the Vertex type contained in the VertexContainer.
 
void disablePerVertexAdjacentEdges ()
 Disables the Optional Adjacent Edges of the vertex.
 
void disablePerVertexAdjacentFaces ()
 Disables the Optional Adjacent Faces of the vertex.
 
void disablePerVertexAdjacentVertices ()
 Disables the Optional Adjacent Vertices of the vertex.
 
void disablePerVertexColor ()
 Disables the Optional Color of the vertex.
 
void disablePerVertexMark ()
 Container::disableVertexMark disables the Optional Mark of the vertex.
 
void disablePerVertexNormal ()
 Checks if the vertex Optional PrincipalCurvature is enabled.
 
void disablePerVertexPrincipalCurvature ()
 Disables the Optional PrincipalCurvature of the vertex.
 
void disablePerVertexQuality ()
 Disables the Optional Quality of the vertex.
 
void disablePerVertexTexCoord ()
 Disables the Optional TexCoord of the vertex.
 
void enableAllPerVertexOptionalComponents ()
 Enables all the optional components associated to the Vertex type contained in the VertexContainer.
 
void enablePerVertexAdjacentEdges ()
 Enables the Optional Adjacent Edges of the vertex.
 
void enablePerVertexAdjacentFaces ()
 Enables the Optional Adjacent Faces of the vertex.
 
void enablePerVertexAdjacentVertices ()
 Enables the Optional Adjacent Vertices of the vertex.
 
void enablePerVertexColor ()
 Enables the Optional Color of the vertex.
 
void enablePerVertexMark ()
 Enables the Optional Mark of the vertex.
 
void enablePerVertexNormal ()
 Enables the Optional Normal of the vertex.
 
void enablePerVertexPrincipalCurvature ()
 Enables the Optional PrincipalCurvature of the vertex.
 
void enablePerVertexQuality ()
 Enables the Optional Quality of the vertex.
 
void enablePerVertexTexCoord ()
 Enables the Optional TexCoord of the vertex.
 
bool hasPerVertexCustomComponent (const std::string &name) const
 Checks if vertices have a custom component with the given name.
 
bool isPerVertexAdjacentEdgesEnabled () const
 Checks if the vertex Optional Adjacent Edges component is enabled.
 
bool isPerVertexAdjacentFacesEnabled () const
 Checks if the vertex Optional Adjacent Faces component is enabled.
 
bool isPerVertexAdjacentVerticesEnabled () const
 Checks if the vertex Optional Adjacent Vertices component is enabled.
 
bool isPerVertexColorEnabled () const
 Checks if the vertex Optional Color is enabled.
 
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.
 
bool isPerVertexMarkEnabled () const
 Checks if the vertex Optional Mark is enabled.
 
bool isPerVertexNormalEnabled () const
 Checks if the vertex Optional Normal is enabled.
 
bool isPerVertexPrincipalCurvatureEnabled () const
 Checks if the vertex Optional PrincipalCurvature is enabled.
 
bool isPerVertexQualityEnabled () const
 Checks if the vertex Optional Quality is enabled.
 
bool isPerVertexTexCoordEnabled () const
 Checks if the vertex Optional TexCoord is enabled.
 
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>
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.
 
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>
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.
 
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 resizeVertices (uint n)
 Resizes the Vertex container to contain n vertices.
 
template<typename K >
requires vert::HasCustomComponents<T>
void serializePerVertexCustomComponentsOfType (std::ostream &os) const
 Serializes in the given output stream all the custom components of the Vertex Element of type K.
 
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.
 
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.
 
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.
 
VertexIterator vertexBegin (bool jumpDeleted=true)
 Returns an iterator to the beginning of the container.
 
ConstVertexIterator vertexBegin (bool jumpDeleted=true) const
 Returns a const iterator to the beginning of the container.
 
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.
 
 VertexContainer ()=default
 Empty constructor that creates an empty container of Vertices.
 
uint vertexContainerSize () const
 Returns the number of vertices (also deleted) contained in the Vertex container of the Mesh.
 
VertexIterator vertexEnd ()
 Returns an iterator to the end of the container.
 
ConstVertexIterator vertexEnd () const
 Returns a const iterator to the end of the 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.
 
uint vertexNumber () const
 Returns the number of non-deleted vertices contained in the Vertex container of the Mesh.
 
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().
 
auto vertices (uint begin, uint end=UINT_NULL)
 Returns a view object that allows to iterate over the Vertices of the container in the given range:
 
auto vertices (uint begin, uint end=UINT_NULL) const
 Returns a view object that allows to iterate over the Vertices of the container in the given range:
 
- Public Member Functions inherited from vcl::mesh::EdgeContainer< T >
uint addEdge ()
 Add an Edge 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 addEdge (uint v0, uint 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.
 
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 clearEdges ()
 Clears the Edge container of the Mesh, deleting all the Edges.
 
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.
 
uint deletedEdgeNumber () const
 Returns the number of deleted Edges in the Edge container, that is edgeContainerSize() - edgeNumber().
 
void deleteEdge (const EdgeType *e)
 Marks as deleted the given Edge, before asserting that the Edge belongs to this container.
 
void deleteEdge (uint i)
 Marks as deleted the Edge with the given id.
 
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>
void deserializePerEdgeCustomComponentsOfType (std::istream &is)
 Deserializes in the given input stream all the custom components of the Edge Element of type K.
 
void disableAllPerEdgeOptionalComponents ()
 Disables all the optional components associated to the Edge type contained in the EdgeContainer.
 
void disablePerEdgeAdjacentEdges ()
 Disables the Optional AdjacentEdges of the Edge.
 
void disablePerEdgeAdjacentFaces ()
 Disables the Optional AdjacentFaces of the Edge.
 
void disablePerEdgeColor ()
 Disables the Optional Color of the Edge.
 
void disablePerEdgeMark ()
 Disables the Optional Mark of the Edge.
 
void disablePerEdgeQuality ()
 Disables the Optional Quality of the Edge.
 
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.
 
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.
 
EdgeIterator edgeBegin (bool jumpDeleted=true)
 Returns an iterator to the beginning of the container.
 
ConstEdgeIterator edgeBegin (bool jumpDeleted=true) const
 Returns a const iterator to the beginning of the container.
 
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.
 
 EdgeContainer ()=default
 Empty constructor that creates an empty container of Edges.
 
uint edgeContainerSize () const
 Returns the number of Edges (also deleted) contained in the Edge container of the Mesh.
 
EdgeIterator edgeEnd ()
 Returns an iterator to the end of the container.
 
ConstEdgeIterator edgeEnd () const
 Returns a const iterator to the end of the 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.
 
uint edgeNumber () const
 Returns the number of non-deleted Edges contained in the Edge container of the Mesh.
 
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().
 
auto edges (uint begin, uint end=UINT_NULL)
 Returns a view object that allows to iterate over the Edges of the container in the given range:
 
auto edges (uint begin, uint end=UINT_NULL) const
 Returns a view object that allows to iterate over the Edges of the container in the given range:
 
void enableAllPerEdgeOptionalComponents ()
 Enables all the optional components associated to the Edge type contained in the EdgeContainer.
 
void enablePerEdgeAdjacentEdges ()
 Enable the Optional AdjacentEdges of the Edge.
 
void enablePerEdgeAdjacentFaces ()
 Enable the Optional AdjacentFaces of the Edge.
 
void enablePerEdgeColor ()
 Enable the Optional Color of the Edge.
 
void enablePerEdgeMark ()
 Enable the Optional Mark of the Edge.
 
void enablePerEdgeQuality ()
 Enable the Optional Quality of the Edge.
 
bool hasPerEdgeCustomComponent (const std::string &name) const
 Checks if Edges have a custom component with the given name.
 
bool isPerEdgeAdjacentEdgesEnabled () const
 Checks if the Edge Optional AdjacentEdges is enabled.
 
bool isPerEdgeAdjacentFacesEnabled () const
 Checks if the Edge Optional AdjacentFaces is enabled.
 
bool isPerEdgeColorEnabled () const
 Checks if the Edge Optional Color is enabled.
 
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.
 
bool isPerEdgeMarkEnabled () const
 Checks if the Edge Optional Mark is enabled.
 
bool isPerEdgeQualityEnabled () const
 Checks if the Edge Optional Quality is enabled.
 
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>
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.
 
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>
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.
 
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 resizeEdges (uint n)
 Resizes the Edge container to contain n Edges.
 
template<typename K >
requires edge::HasCustomComponents<T>
void serializePerEdgeCustomComponentsOfType (std::ostream &os) const
 Serializes in the given output stream all the custom components of the Edge Element of type K.
 
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.
 
- Public Member Functions inherited from vcl::comp::BoundingBox< PointType, ParentElemType, OPT >
BoundingBoxTypeboundingBox ()
 Returns a reference to the bounding box of this object.
 
const BoundingBoxTypeboundingBox () const
 Returns a const reference to the bounding box of this object.
 
 BoundingBox ()=default
 Initilizes the bounding box to an invalid bounding box.
 
- Public Member Functions inherited from vcl::comp::Color< ParentElemType, OPT >
vcl::Colorcolor ()
 Returns a reference pf the color of the element.
 
const vcl::Colorcolor () const
 Returns a const reference of the color of the element.
 
 Color ()=default
 Initilizes the color to black (with alpha 255).
 
- Public Member Functions inherited from vcl::comp::Mark< ParentElemType, OPT >
void decrementMark ()
 Decrements the mark of the current element/mesh by 1.
 
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.
 
 Mark ()
 Constructor that initializes the mark to 0.
 
int mark () const
 Returns the value of the mark.
 
void resetMark ()
 Resets the mark to 0.
 
- Public Member Functions inherited from vcl::comp::Name< ParentElemType, OPT >
std::string & name ()
 Returns the name of this object.
 
const std::string & name () const
 Returns the name of this object.
 
 Name ()=default
 Initilizes an empty name.
 
- Public Member Functions inherited from vcl::comp::TextureImages
void clearTexturePaths ()
 Clears the vector of textures.
 
void clearTextures ()
 Clears the vector of textures.
 
uint indexOfTexturePath (const std::string &path) const
 Returns the index of the texture with the given path, or UINT_NULL if the texture is not found.
 
std::string & meshBasePath ()
 Returns a reference to the mesh base path.
 
const std::string & meshBasePath () const
 Returns the mesh base path.
 
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.
 
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 Texturetexture (uint i) const
 Returns the i-th texture of the mesh. The path of the texture is relative to the mesh base path.
 
TextureIterator textureBegin ()
 Returns an iterator to the beginning of the vector of textures.
 
ConstTextureIterator textureBegin () const
 Returns a const iterator to the beginning of the vector of textures.
 
TextureIterator textureEnd ()
 Returns an iterator to the end of the vector of textures.
 
ConstTextureIterator textureEnd () const
 Returns a const iterator to the end of the vector of textures.
 
 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.
 
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 & texturePath (uint i) const
 Returns the path of the i-th texture of the mesh. The path is relative to the mesh base path.
 
TexFileNamesIterator texturePathBegin ()
 Returns an iterator to the beginning of the vector of texture paths.
 
ConstTexFileNamesIterator texturePathBegin () const
 Returns a const 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 texturePathEnd () const
 Returns a const iterator to the end of the vector of texture paths.
 
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:
 
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:
 
- Public Member Functions inherited from vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >
 TransformMatrix ()
 Initializes the transform matrix to identity.
 
TransformMatrixTypetransformMatrix ()
 Returns a reference to the transform matrix.
 
const TransformMatrixTypetransformMatrix () const
 Returns a const reference to the transform matrix.
 
- Public Member Functions inherited from vcl::comp::CustomComponents< ParentElemType >
template<typename CompType >
requires (!IS_VERTICAL)
void addCustomComponent (const std::string &compName, const CompType &value=CompType())
 
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 >
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 >
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.
 
 CustomComponents ()=default
 Initilizes an empty container of custom components.
 
std::type_index customComponentType (const std::string &compName) const
 Returns the std::type_index of the custom component of the given name.
 
void deleteCustomComponent (const std::string &compName)
 
template<typename CompType >
requires (!IS_VERTICAL)
void deserializeCustomComponentsOfType (std::istream &is)
 
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.
 
template<typename CompType >
requires (!IS_VERTICAL)
void serializeCustomComponentsOfType (std::ostream &os) const
 
- Public Member Functions inherited from vcl::Mesh< mesh::VertexContainer< edgemesh::Vertex< Scalar, INDEXED > >, mesh::EdgeContainer< edgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
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 addPerElementCustomComponent (const std::string &name)
 Adds a custom component of type K having the given name to the Element having ID ELEM_ID.
 
void append (const Mesh &m)
 Appends all the elements contained in the mesh m to this mesh.
 
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.
 
void clear ()
 Clears all the Elements contained in the mesh.
 
void clearElements ()
 Clears the container of ELEM_ID elements the Mesh, deleting all the Elements.
 
void compact ()
 Compacts all the containers of the mesh.
 
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.
 
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.
 
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.
 
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.
 
void deleteElement (uint i)
 Marks as deleted the element at the given index from its container, deduced from the template index ELEM_ID.
 
void deletePerElementCustomComponent (const std::string &name)
 Deletes the custom component of the given name from the Element having ID ELEM_ID.
 
void deserialize (std::istream &is)
 
void deserializePerElementCustomComponentsOfType (std::istream &is)
 Deserializes the custom components of type K of the element with ID ELEM_ID.
 
void disableAllOptionalComponents ()
 Disables all the optional components of the elements of the containers if the mesh.
 
void disablePerElementComponent ()
 Disables the optional Component having ID COMP_ID for elements having ID ELEM_ID in the mesh.
 
autoelement (uint i)
 Returns the element of the given type at the given index inside its container of this mesh.
 
const autoelement (uint i) const
 Returns the element of the given type at the given index inside its container of this mesh.
 
auto elements (bool jumpDeleted=true)
 
auto elements (bool jumpDeleted=true) const
 
auto elements (uint begin, uint end=UINT_NULL)
 
auto elements (uint begin, uint end=UINT_NULL) const
 Returns a lightweight const view object that stores the begin and end const iterators of the container of the elements having ID ELEM_ID in the mesh. 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 enableAllOptionalComponents ()
 Enables all the optional components of the elements of the containers if the mesh.
 
void enablePerElementComponent ()
 Enables the optional Component having ID COMP_ID for elements having ID ELEM_ID in the mesh.
 
void enableSameOptionalComponentsOf (const OtherMeshType &m)
 Enables all the OptionalComponents of this mesh according to the Components available on the OtherMeshType m.
 
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.
 
bool hasPerElementCustomComponent (const std::string &name) const
 Returns true if the Element having ID ELEM_ID has a custom component with the given name.
 
void importFrom (const OtherMeshType &m)
 Imports all the components that can be imported from another type of 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.
 
bool isCompact () const
 Returns true if this mesh is compact, meaning that all its containers have no deleted elements (size == element number).
 
bool isPerElementComponentEnabled () const
 Returns true if optional Component having ID COMP_ID is enabled for elements having ID ELEM_ID in the mesh.
 
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.
 
 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.
 
uint number () const
 Returns the number of elements of the given type in this mesh.
 
Meshoperator= (Mesh oth)
 Assignment operator of the Mesh.
 
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.
 
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.
 
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.
 
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.
 
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 resize (uint n)
 Resizes the Element container to contain n Elements of type ELEM_ID.
 
void serialize (std::ostream &os) const
 
void serializePerElementCustomComponentsOfType (std::ostream &os) const
 Serializes the custom components of type K of the element with ID ELEM_ID.
 
void swap (Mesh &m2)
 Swaps this mesh with the other input Mesh m2.
 
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).
 
- Static Public Member Functions inherited from vcl::Mesh< mesh::VertexContainer< edgemesh::Vertex< Scalar, INDEXED > >, mesh::EdgeContainer< edgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, 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::comp::BoundingBox< PointType, ParentElemType, OPT >
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::comp::Color< ParentElemType, OPT >
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::comp::Mark< ParentElemType, OPT >
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::comp::Name< ParentElemType, OPT >
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::comp::TextureImages
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::comp::CustomComponents< ParentElemType >
void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
- Protected Member Functions inherited from vcl::Mesh< mesh::VertexContainer< edgemesh::Vertex< Scalar, INDEXED > >, mesh::EdgeContainer< edgemesh::Edge< Scalar, INDEXED > >, mesh::BoundingBox3< Scalar >, mesh::Mark, mesh::Name, mesh::TextureImages, mesh::TransformMatrix< Scalar >, mesh::CustomComponents >
void clearContainer ()
 
void compactContainer ()
 
void disableAllOptionalComponentsInContainer ()
 
void enableAllOptionalComponentsInContainer ()
 
bool isContainerCompact () const
 
void updateAllReferences (const Element *oldBase)
 
void updateAllReferences (const std::vector< uint > &newIndices)
 
void updateReferences (const Element *oldBase)
 
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 Element *oldBase, TypeWrapper< A... >)
 
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 std::vector< uint > &newIndices)
 

Detailed Description

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

The EdgeMeshT class is a mesh class that represents a mesh that stores only vertices and edges (no faces).

It allows to store edgemesh::Vertex and edgemesh::Edge elements.

The mesh is templated over the scalar type and a boolean flag that indicates whether the mesh uses indices to store vertices of edges and adjacency information.

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: