Visual Computing Library
devel
|
The Vertex type used by the TriMeshT class. More...
#include <vclib/meshes/tri_mesh.h>
Additional Inherited Members | |
![]() | |
using | PositionType = P |
Expose the type of the Position. | |
![]() | |
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 | AdjacentFaceIterator = Base::Iterator |
using | AdjacentFaceType = Face |
Expose the type of the Adjacent Face. | |
using | ConstAdjacentFaceIndexIterator = Base::ConstIndexIterator |
using | ConstAdjacentFaceIterator = Base::ConstIterator |
![]() | |
using | AdjacentVertexIterator = Base::Iterator |
using | AdjacentVertexType = Vertex |
Expose the type of the Adjacent Vertex. | |
using | ConstAdjacentVertexIndexIterator = Base::ConstIndexIterator |
using | ConstAdjacentVertexIterator = Base::ConstIterator |
![]() | |
using | PrincipalCurvatureType = vcl::PrincipalCurvature< Scalar > |
Expose the type of the principal curvature object. | |
![]() | |
using | TexCoordType = vcl::TexCoordIndexed< Scalar > |
Expose the type of the TexCoord. | |
![]() | |
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. | |
![]() | |
P & | position () |
Returns a reference of the position of the element. | |
const P & | position () const |
Returns a const reference of the position of the element. | |
Position ()=default | |
Initilizes the Position to (0, 0, 0). | |
![]() | |
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. | |
![]() | |
void | __adjacentFaces () const |
AdjacentFaces ()=default | |
Empty constructor. | |
Face * | adjFace (uint i) |
Returns the pointer to the i-th adjacent face of this element. | |
const Face * | adjFace (uint i) const |
Returns a const pointer to the i-th adjacent face of this element. | |
AdjacentFaceIterator | adjFaceBegin () |
Returns an iterator to the first adjacent face in the container of this component. | |
ConstAdjacentFaceIterator | adjFaceBegin () const |
Returns a const iterator to the first adjacent face in the container of this component. | |
AdjacentFaceIterator | adjFaceEnd () |
Returns an iterator to the end of the container of this component. | |
ConstAdjacentFaceIterator | adjFaceEnd () const |
Returns a const iterator to the end of the container of this component. | |
uint | adjFaceIndex (uint i) const |
Returns the index in the face container of the i-th adjacent face of the element. | |
ConstAdjacentFaceIndexIterator | adjFaceIndexBegin () const |
Returns an iterator to the first adjacent face index in the container of this component. | |
ConstAdjacentFaceIndexIterator | adjFaceIndexEnd () const |
Returns an iterator to the end of the container of this component. | |
uint | adjFaceIndexMod (int i) const |
Returns the index in the face container of the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to get the "index
of the adjacent face next to position k", without check if it is less than the number of adjacent faces. Works also for negative numbers: | |
View< ConstAdjacentFaceIndexIterator > | adjFaceIndices () const |
Returns a lightweight view object that stores the begin and end iterators of the container of adjacent face indices of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
Face * | adjFaceMod (int i) |
Returns the pointer to the i-th adjacent face of this element but using as index the module between i and the number of adjacent faces. | |
const Face * | adjFaceMod (int i) const |
Same of adjFaceMod, but returns a const Pointer to the adjacent face. | |
View< AdjacentFaceIterator > | adjFaces () |
Returns a lightweight view object that stores the begin and end iterators of the container of adjacent faces of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
View< ConstAdjacentFaceIterator > | adjFaces () const |
Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent faces of the element. The view object exposes the iterators trough the begin() and end() member functions, and therefore the returned object can be used in range-based for loops: | |
uint | adjFacesNumber () const |
Returns the number of adjacent faces of this element. | |
void | clearAdjFaces () |
Clears the container of adjacent faces, making it empty. | |
bool | containsAdjFace (const Face *f) const |
Returns true if the container of adjacent faces contains the given face, false otherwise. | |
bool | containsAdjFace (uint fi) const |
Returns true if the container of adjacent faces contains the face with the given index, false otherwise. | |
void | eraseAdjFace (uint i) |
Removes the adjacent face at the given position from the container. | |
uint | indexOfAdjFace (const Face *f) const |
Returns the index of the given adjacent face in the container of this element. If the given adjacent face is not in the container, returns UINT_NULL. | |
uint | indexOfAdjFace (uint fi) const |
Returns the index of the adjacent face with the given index in the container of this element. If the adjacent face with the given index is not in the container, returns UINT_NULL. | |
void | insertAdjFace (uint i, Face *f) |
Inserts the given adjacent face in the container at the given position. | |
void | insertAdjFace (uint i, uint fi) |
Inserts the adjacent face with the given index in the container at the given position. | |
void | pushAdjFace (Face *f) |
Pushes in the back of the container the given adjacent face. | |
void | pushAdjFace (uint fi) |
Pushes in the back of the container the given adjacent face. | |
void | resizeAdjFaces (uint n) |
Resize the container of the adjacent faces to the given size. | |
void | setAdjFace (ConstAdjacentFaceIndexIterator it, Face *f) |
Sets the adjacent face pointed by the iterator. | |
void | setAdjFace (ConstAdjacentFaceIndexIterator it, uint fi) |
Sets the adjacent face pointed by the iterator. | |
void | setAdjFace (ConstAdjacentFaceIterator it, Face *f) |
Sets the adjacent face pointed by the iterator. | |
void | setAdjFace (ConstAdjacentFaceIterator it, uint fi) |
Sets the adjacent face pointed by the iterator. | |
void | setAdjFace (uint i, Face *f) |
Sets the i-th adjacent face of this element. | |
void | setAdjFace (uint i, uint fi) |
Sets the i-th adjacent face of the element. | |
void | setAdjFaceMod (int i, Face *f) |
Sets the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to set the "next adjacent face after position k", without check if it is less than the number of adjacent faces. Works also for negative numbers: | |
void | setAdjFaceMod (int i, uint fi) |
Sets the i-th adjacent face of the element, but using as index the module between i and the number of adjacent faces. You can use this function if you need to set the "next adjacent face after position k", without check if it is less than the number of adjacent faces. Works also for negative numbers: | |
template<Range Rng> requires InputRange<Rng, Face*> | |
void | setAdjFaces (Rng &&r) |
Sets all the adjacent faces of this element. | |
template<Range Rng> requires InputRange<Rng, uint> | |
void | setAdjFaces (Rng &&r) |
Sets all the adjacent faces of this element. | |
![]() | |
void | __adjacentVertices () const |
AdjacentVertices ()=default | |
Empty constructor. | |
Vertex * | adjVertex (uint i) |
Returns the pointer to the i-th adjacent vertex of an element. | |
const Vertex * | adjVertex (uint i) const |
Returns a const pointer to the i-th adjacent vertex of the element. | |
AdjacentVertexIterator | adjVertexBegin () |
Returns an iterator to the first adjacent vertex in the container of this component. | |
ConstAdjacentVertexIterator | adjVertexBegin () const |
Returns a const iterator to the first adjacent vertex in the container of this component. | |
AdjacentVertexIterator | adjVertexEnd () |
Returns an iterator to the end of the container of this component. | |
ConstAdjacentVertexIterator | adjVertexEnd () const |
Returns a const iterator to the end of the container of this component. | |
uint | adjVertexIndex (uint i) const |
Returns the index in the vertex container of the i-th adjacent vertex of the element. | |
ConstAdjacentVertexIndexIterator | adjVertexIndexBegin () const |
Returns an iterator to the first adjacent vertex index in the container of this component. | |
ConstAdjacentVertexIndexIterator | adjVertexIndexEnd () const |
Returns an iterator to the end of the container of this component. | |
uint | adjVertexIndexMod (int i) const |
Returns the index in the vertex container of the i-th adjacent vertex of the element, but using as index the module between i and the number of adjacent vertices. You can use this function if you need to get the "index of the adjacent vertex next to position k", without check if it is less than the number of adjacent vertices. Works also for negative numbers: | |
View< ConstAdjacentVertexIndexIterator > | adjVertexIndices () const |
Returns a lightweight view object that stores the begin and end iterators of the container of adjacent 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 * | adjVertexMod (int i) |
Returns the pointer to the i-th adjacent vertex of the element, but using as index the module between i and the number of adjacent vertices. You can use this function if you need to get the "next adjacent
vertex after position k", without check if it is less than the number of adj vertices. Works also for negative numbers: | |
const Vertex * | adjVertexMod (int i) const |
Same of adjVertexMod, but returns a const Pointer to the adjacent vertex. | |
View< AdjacentVertexIterator > | adjVertices () |
Returns a lightweight view object that stores the begin and end iterators of the container of adjacent 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< ConstAdjacentVertexIterator > | adjVertices () const |
Returns a lightweight const view object that stores the begin and end iterators of the container of adjacent 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: | |
uint | adjVerticesNumber () const |
Returns the number of adjacent vertices of the element. | |
void | clearAdjVertices () |
Clears the container of adjacent vertices, making it empty. | |
bool | containsAdjVertex (const Vertex *v) const |
Returns true if the container of adjacent vertices contains the given vertex, false otherwise. | |
bool | containsAdjVertex (uint vi) const |
Returns true if the container of adjacent vertices contains the given vertex, false otherwise. | |
void | eraseAdjVertex (uint i) |
Removes the adjacent vertex at the given position from the container. | |
uint | indexOfAdjVertex (const Vertex *v) const |
Returns the index of the given adjacent vertex in the container of the element. If the given adjacent vertex is not in the container, returns UINT_NULL. | |
uint | indexOfAdjVertex (uint vi) const |
Returns the index of the adjacent vertex with the given index in the container of the element. If the given adjacent vertex is not in the container, returns UINT_NULL. | |
void | insertAdjVertex (uint i, uint vi) |
Inserts the given adjacent vertex in the container at the given position. | |
void | insertAdjVertex (uint i, Vertex *v) |
Inserts the given adjacent vertex in the container at the given position. | |
void | pushAdjVertex (uint vi) |
Pushes in the back of the container the given adjacent vertex.. | |
void | pushAdjVertex (Vertex *v) |
Pushes in the back of the container the given adjacent vertex. | |
void | resizeAdjVertices (uint n) |
Resize the container of the adjacent vertices to the given size. | |
void | setAdjVertex (ConstAdjacentVertexIndexIterator it, uint vi) |
Sets the adjacent vertex pointed by the iterator. | |
void | setAdjVertex (ConstAdjacentVertexIndexIterator it, Vertex *v) |
Sets the adjacent vertex pointed by the iterator. | |
void | setAdjVertex (ConstAdjacentVertexIterator it, uint vi) |
Sets the adjacent vertex pointed by the iterator. | |
void | setAdjVertex (ConstAdjacentVertexIterator it, Vertex *v) |
Sets the adjacent vertex pointed by the iterator. | |
void | setAdjVertex (uint i, uint vi) |
Sets the i-th adjacent vertex of the element. | |
void | setAdjVertex (uint i, Vertex *v) |
Sets the i-th adjacent vertex of the element. | |
void | setAdjVertexMod (int i, uint vi) |
Sets the i-th adjacent vertex of the element, but using as index the module between i and the number of adjacent vertices. You can use this function if you need to set the "next adjacent vertex after position
k", without check if it is less than the number of adjacent vertices. Works also for negative numbers: | |
void | setAdjVertexMod (int i, Vertex *v) |
Sets the i-th adjacent vertex of the element, but using as index the module between i and the number of adjacent vertices. You can use this function if you need to set the "next adjacent vertex after position
k", without check if it is less than the number of adjacent vertices. Works also for negative numbers: | |
template<Range Rng> requires InputRange<Rng, Vertex*> | |
void | setAdjVertices (Rng &&r) |
Sets all the adjacent vertices of this element. | |
template<Range Rng> requires InputRange<Rng, uint> | |
void | setAdjVertices (Rng &&r) |
Sets all the adjacent vertices of this element. | |
![]() | |
PrincipalCurvatureType & | principalCurvature () |
Returns a reference of the principal curvature of the element. | |
const PrincipalCurvatureType & | principalCurvature () const |
Returns a const reference of the principal curvature of the element. | |
PrincipalCurvature ()=default | |
Initilizes the PrincipalCurvature values to 0. | |
![]() | |
TexCoordType & | texCoord () |
Returns a reference of the tex coord of the element. | |
const TexCoordType & | texCoord () const |
Returns a const reference of the tex coord of the element. | |
TexCoord ()=default | |
Initilizes the Texture Coordinate to (0, 0). | |
![]() | |
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 |
![]() | |
Vertex ()=default | |
Empty constructor. | |
![]() | |
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 int | ADJ_FACE_NUMBER = Base::SIZE |
Static size of the container. If the container is dynamic, this value will be negative and you should use the adjFacesNumber() member function. | |
![]() | |
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 &v, 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=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 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=true) |
void | serialize (std::ostream &os) const |
![]() | |
void | setParentMesh (void *parentMesh) |
The Vertex type used by the TriMeshT 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 faces and adjacency information. |