Visual Computing Library
devel
|
The Edge type used by the EdgeMeshT class. More...
#include <vclib/meshes/edge_mesh.h>
Additional Inherited Members | |
![]() | |
using | ConstVertexIndexIterator = Base::ConstIndexIterator |
using | ConstVertexIterator = Base::ConstIterator |
using | VertexIterator = Base::Iterator |
using | VertexType = Vertex |
Expose the type of the Vertex. | |
![]() | |
using | NormalType = P |
Expose the type of the Normal. | |
![]() | |
using | ColorType = vcl::Color |
Expose the type of the Color. | |
![]() | |
using | QualityType = Scalar |
Exposes the scalar used as Quality type. | |
![]() | |
using | AdjacentEdgeIterator = Base::Iterator |
using | AdjacentEdgeType = Edge |
Expose the type of the Adjacent Edge. | |
using | ConstAdjacentEdgeIndexIterator = Base::ConstIndexIterator |
using | ConstAdjacentEdgeIterator = Base::ConstIterator |
![]() | |
using | VertexType = VRefs::VertexType |
![]() | |
using | Components = TypeWrapper< Comps... > |
Components is an alias to a vcl::TypeWrapper that wraps all the Components from which the Element inherits (Comps). | |
using | ParentMeshType = MeshType |
![]() | |
using | ParentMeshType = MeshType |
![]() | |
BitFlags () | |
Initializes the bits to false . | |
bool | deleted () const |
Returns whether the current Element is deleted or not. | |
int | exportFlagsToVCGFormat () const |
Returns the bit flags of this element in the format of the VCG library. | |
void | importFlagsFromVCGFormat (int f) |
Sets all the flags of this element to the values contained in the integer input parameter, that represents the bit flags of the VCG library. | |
BitProxy< FT > | onBorder () |
Accesses the 'onBorder' bit of this Element, returning a reference to it. | |
bool | onBorder () const |
Returns whether the current Element is on border or not. | |
void | resetBitFlags () |
Unsets all the flags of this Element and sets them to false , except the deleted flag, which needs to be manually reset. | |
BitProxy< FT > | selected () |
Accesses the 'selected' bit of this Element, returning a reference to it. | |
bool | selected () const |
Returns whether the current Element is selected or not. | |
BitProxy< FT > | userBit (uint bit) |
Returns the boolean value of the user bit of this Element given in input. The bit is checked to be less than the total number of assigned user bits, which in this class is 4. | |
bool | userBit (uint bit) const |
Returns a reference to the value of the user bit of this Element given in input. The bit is checked to be less than the total number of assigned user bits, which in this class is 4. | |
BitProxy< FT > | visited () |
Accesses the 'visited' bit of this Element, returning a reference to it. | |
bool | visited () const |
Returns whether the current Element has been visited or not. | |
![]() | |
void | clearVertices () |
Clears the container of vertices, making it empty. | |
bool | containsVertex (const Vertex *v) const |
Returns true if the container of vertices contains the given vertex, false otherwise. | |
bool | containsVertex (uint vi) const |
Returns true if the container of vertices contains the vertex with the given index, false otherwise. | |
void | eraseVertex (uint i) |
Removes the vertex at the given position from the container. | |
uint | indexOfEdge (const Vertex *v1, const Vertex *v2) const |
Returns the index of the given edge composed of the two vertices v1 and v2 in the container of the element. | |
uint | indexOfEdge (uint vi1, uint vi2) const |
Returns the index of the edge composed of the two vertices with the given indices in the container of the element. | |
uint | indexOfVertex (const Vertex *v) const |
Returns the index of the given vertex in the container of the element. If the given vertex is not in the container, returns UINT_NULL. | |
uint | indexOfVertex (uint vi) const |
Returns the index of the vertex with the given index in the container of the element. If the vertex with the given index is not in the container, returns UINT_NULL. | |
void | insertVertex (uint i, uint vi) |
Inserts the vertex with the given index in the container at the given position. | |
void | insertVertex (uint i, Vertex *v) |
Inserts the given vertex in the container at the given position. | |
void | pushVertex (uint vi) |
Pushes in the back of the container the given vertex. | |
void | pushVertex (Vertex *v) |
Pushes in the back of the container the given vertex. | |
void | resizeVertices (uint n) |
Resize the container of the vertices to the given size. | |
void | setVertex (ConstVertexIndexIterator it, uint vi) |
Sets the vertex pointed by the iterator. | |
void | setVertex (ConstVertexIndexIterator it, Vertex *v) |
Sets the vertex pointed by the iterator. | |
void | setVertex (ConstVertexIterator it, uint vi) |
Sets the vertex pointed by the iterator. | |
void | setVertex (ConstVertexIterator it, Vertex *v) |
Sets the vertex pointed by the iterator. | |
void | setVertex (uint i, uint vi) |
Sets the i-th vertex of the element. | |
void | setVertex (uint i, Vertex *v) |
Sets the i-th vertex of the element. | |
void | setVertexMod (int i, uint vi) |
Sets the i-th vertex of the element, but using as index the module between i and the number of vertices. You can use this function if you need to set the "next vertex after position k", without check if it is less than the number of vertices. Works also for negative numbers: | |
void | setVertexMod (int i, Vertex *v) |
Sets the i-th vertex of the element, but using as index the module between i and the number of vertices. You can use this function if you need to set the "next vertex after position k", without check if it is less than the number of vertices. Works also for negative numbers: | |
template<Range Rng> requires InputRange<Rng, Vertex*> | |
void | setVertices (Rng &&r) |
Sets all the vertex pointers of the element. | |
template<Range Rng> requires InputRange<Rng, uint> | |
void | setVertices (Rng &&r) |
Sets all the vertex pointers of the element. | |
Vertex * | vertex (uint i) |
Returns the pointer to the i-th vertex of the element. | |
const Vertex * | vertex (uint i) const |
Returns a const pointer to the i-th vertex of the element. | |
VertexIterator | vertexBegin () |
Returns an iterator to the first vertex in the container of this component. | |
ConstVertexIterator | vertexBegin () const |
Returns a const iterator to the first vertex in the container of this component. | |
VertexIterator | vertexEnd () |
Returns an iterator to the end of the container of this component. | |
ConstVertexIterator | vertexEnd () const |
Returns a const iterator to the end of the container of this component. | |
uint | vertexIndex (uint i) const |
Returns the index in the vertex container of the i-th vertex of the element. | |
ConstVertexIndexIterator | vertexIndexBegin () const |
Returns an iterator to the first vertex index in the container of this component. | |
ConstVertexIndexIterator | vertexIndexEnd () const |
Returns an iterator to the end of the container of this component. | |
uint | vertexIndexMod (int i) const |
Returns the index in the vertex container of the i-th vertex of the element, but using as index the module between i and the number of vertices. You can use this function if you need to get the "index of the
vertex next to position k", without check if it is less than the number of vertices. Works also for negative numbers: | |
View< ConstVertexIndexIterator > | vertexIndices () const |
Returns a lightweight view object that stores the begin and end iterators of the container of vertex indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
Vertex * | vertexMod (int i) |
Returns a reference of the pointer to the i-th vertex of the element, but using as index the module between i and the number of vertices. You can use this function if you need to get the "next vertex
after position k", without check if it is less than the number of vertices. Works also for negative numbers: | |
const Vertex * | vertexMod (int i) const |
Same of vertexMod, but returns a const pointer to the vertex. | |
uint | vertexNumber () const |
Returns the number of vertices of the element. | |
VertexReferences ()=default | |
Empty constructor. | |
View< VertexIterator > | vertices () |
Returns a lightweight view object that stores the begin and end iterators of the container of vertices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
View< ConstVertexIterator > | vertices () const |
Returns a lightweight const view object that stores the begin and end iterators of the container of vertices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
![]() | |
P & | normal () |
Returns a reference of the normal of the element. | |
const P & | normal () const |
Returns a const reference of the normal of the element. | |
Normal ()=default | |
Initilizes the Normal to (0, 0, 0). | |
![]() | |
vcl::Color & | color () |
Returns a reference pf the color of the element. | |
const vcl::Color & | color () const |
Returns a const reference of the color of the element. | |
Color ()=default | |
Initilizes the color to black (with alpha 255). | |
![]() | |
QualityType & | quality () |
Returns a reference of the quality of the element. | |
const QualityType & | quality () const |
Returns a const reference of the quality of the element. | |
Quality ()=default | |
Initilizes the Quality value to 0. | |
![]() | |
AdjacentEdges ()=default | |
Empty constructor. | |
Edge * | adjEdge (uint i) |
Returns the pointer to the i-th adjacent edge of the element. | |
const Edge * | adjEdge (uint i) const |
Returns a const pointer to the i-th adjacent edge of the element. | |
AdjacentEdgeIterator | adjEdgeBegin () |
Returns an iterator to the first adjacent edge in the container of this component. | |
ConstAdjacentEdgeIterator | adjEdgeBegin () const |
Returns a const iterator to the first adjacent edge in the container of this component. | |
AdjacentEdgeIterator | adjEdgeEnd () |
Returns an iterator to the end of the container of this component. | |
ConstAdjacentEdgeIterator | adjEdgeEnd () const |
Returns a const iterator to the end of the container of this component. | |
uint | adjEdgeIndex (uint i) const |
Returns the index in the edge container of the i-th adjacent edge of the element. | |
ConstAdjacentEdgeIndexIterator | adjEdgeIndexBegin () const |
Returns an iterator to the first adjacent edge index in the container of this component. | |
ConstAdjacentEdgeIndexIterator | adjEdgeIndexEnd () const |
Returns an iterator to the end of the container of this component. | |
uint | adjEdgeIndexMod (int i) const |
Returns the index in the edge container of the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to get the "index
of the adjacent edge next to position k", without check if it is less than the number of adjacent edges. Works also for negative numbers: | |
View< ConstAdjacentEdgeIndexIterator > | adjEdgeIndices () const |
Returns a lightweight view object that stores the begin and end iterators of the container of adjacent edge indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
Edge * | adjEdgeMod (int i) |
Returns the pointer to the i-th adjacent edge of the element but using as index the module between i and the number of adjacent edges. You can use this function if you need to get the "next adjacent edge after
position k", without check if it is less than the number of adj edges. Works also for negative numbers: | |
const Edge * | adjEdgeMod (int i) const |
Same of adjEdgeMod, but returns a const Pointer to the adjacent edge. | |
View< AdjacentEdgeIterator > | adjEdges () |
Returns a lightweight view object that stores the begin and end iterators of the container of adjacent edges of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
View< ConstAdjacentEdgeIterator > | adjEdges () const |
Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent edges of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
uint | adjEdgesNumber () const |
Returns the number of adjacent edges of this element. | |
void | clearAdjEdges () |
Clears the container of adjacent edges, making it empty. | |
bool | containsAdjEdge (const Edge *e) const |
Returns true if the container of adjacent edges contains the given edge, false otherwise. | |
bool | containsAdjEdge (uint ei) const |
Returns true if the container of adjacent edges contains the given index, false otherwise. | |
void | eraseAdjEdge (uint i) |
Removes the adjacent edge at the given position from the container. | |
uint | indexOfAdjEdge (const Edge *e) const |
Returns the index of the given adjacent edge in the container of the element. If the given adjacent edge is not in the container, returns UINT_NULL. | |
uint | indexOfAdjEdge (uint ei) const |
Returns the index of the adjacent edge with the given index in the container of the element. If the adjacent edge with the given index is not in the container, returns UINT_NULL. | |
void | insertAdjEdge (uint i, Edge *e) |
Inserts the given adjacent edge in the container at the given position. | |
void | insertAdjEdge (uint i, uint ei) |
Inserts the adjacent edge with the given index in the container at the given position. | |
void | pushAdjEdge (Edge *e) |
Pushes in the back of the container the given adjacent edge. | |
void | pushAdjEdge (uint ei) |
Pushes in the back of the container the given adjacent edge. | |
void | resizeAdjEdges (uint n) |
Resize the container of the adjacent edges to the given size. | |
void | setAdjEdge (ConstAdjacentEdgeIndexIterator it, Edge *e) |
Sets the adjacent edge pointed by the iterator. | |
void | setAdjEdge (ConstAdjacentEdgeIndexIterator it, uint ei) |
Sets the adjacent edge pointed by the iterator. | |
void | setAdjEdge (ConstAdjacentEdgeIterator it, Edge *e) |
Sets the adjacent edge pointed by the iterator. | |
void | setAdjEdge (ConstAdjacentEdgeIterator it, uint ei) |
Sets the adjacent edge pointed by the iterator. | |
void | setAdjEdge (uint i, Edge *e) |
Sets the i-th adjacent edge of the element. | |
void | setAdjEdge (uint i, uint ei) |
Sets the i-th adjacent edge of the element. | |
void | setAdjEdgeMod (int i, Edge *e) |
Sets the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to set the "next adjacent edge after position k", without check if it is less than the number of adjacent edges. Works also for negative numbers: | |
void | setAdjEdgeMod (int i, uint ei) |
Sets the i-th adjacent edge of the element, but using as index the module between i and the number of adjacent edges. You can use this function if you need to set the "next adjacent edge after position k", without check if it is less than the number of adjacent edges. Works also for negative numbers: | |
template<Range Rng> requires InputRange<Rng, Edge*> | |
void | setAdjEdges (Rng &&r) |
Sets all the adjacent edges of the element. | |
template<Range Rng> requires InputRange<Rng, uint> | |
void | setAdjEdges (Rng &&r) |
Sets all the adjacent edges of the element. | |
![]() | |
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. | |
![]() | |
template<typename CompType > requires (!IS_VERTICAL) | |
void | addCustomComponent (const std::string &compName, const CompType &value=CompType()) |
template<typename CompType > | |
CompType & | customComponent (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 CompType & | customComponent (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 |
![]() | |
Edge ()=default | |
Empty constructor. | |
void | setVertices (uint vi0, uint vi1) |
Sets the vertices of the edge. | |
void | setVertices (VertexType *v0, VertexType *v1) |
Sets the vertices of the edge. | |
![]() | |
template<uint COMP_ID> | |
auto & | component () |
template<uint COMP_ID> | |
const auto & | component () const |
void | deserialize (std::istream &in) |
template<typename ElType > | |
void | importFrom (const ElType &v, bool importRefs=true) |
uint | index () const |
void | serialize (std::ostream &out) const |
![]() | |
ParentMeshPointer & | operator= (const ParentMeshPointer< MeshType > &) |
constexpr MeshType * | parentMesh () |
constexpr const MeshType * | parentMesh () const |
ParentMeshPointer (const ParentMeshPointer< MeshType > &) | |
ParentMeshPointer (ParentMeshPointer< MeshType > &&) | |
![]() | |
static const uint | USER_BITS_NUMBER = sizeof(FT) * 8 - FIRST_USER_BIT |
Static number of bits that can have custom meanings to the user. | |
![]() | |
static const bool | INDEXED = STORE_INDICES |
static const int | VERTEX_NUMBER = Base::SIZE |
![]() | |
static const int | ADJ_EDGE_NUMBER = Base::SIZE |
Static size of the container. If the container is dynamic, this value will be negative and you should use the adjEdgesNumber() member function. | |
![]() | |
static const uint | COMPONENT_ID = CompId::CUSTOM_COMPONENTS |
The ID of component. | |
![]() | |
static const uint | ELEMENT_ID = ELEM_ID |
![]() | |
BitProxy< FT > | deletedBit () |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool importRefs=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool importRefs=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | deserialize (std::istream &is) |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | setParentMesh (void *parentMesh) |
The Edge type used by the EdgeMeshT class.
Scalar | The scalar type used for the mesh. |
I | A boolean flag that indicates whether the mesh uses indices or pointers to store vertices of edges and adjacency information. |