ug4
|
contains methods to manipulate vertices More...
Functions | |
template<class TVrtIter , class TAPosition > | |
UG_API TAPosition::ValueType | ug::CalculateBarycenter (TVrtIter vrtsBegin, TVrtIter vrtsEnd, Grid::VertexAttachmentAccessor< TAPosition > &aaPos) |
calculates the barycenter of a set of vertices More... | |
template<class TAAPosVRT > | |
UG_API void | ug::CalculateBoundaryVertexNormal2D (typename TAAPosVRT::ValueType &nOut, Grid &grid, Vertex *vrt, TAAPosVRT &aaPos) |
calculates the normal of a boundary vertex using associated faces More... | |
template<class TAAPosVRT > | |
UG_API void | ug::CalculateBoundaryVertexNormal3D (vector3 &nOut, Grid &grid, Vertex *vrt, TAAPosVRT &aaPos) |
calculates the normal of a boundary vertex using associated volumes More... | |
template<class TVrtIter , class TAPosition > | |
UG_API void | ug::CalculateBoundingBox (typename TAPosition::ValueType &vMinOut, typename TAPosition::ValueType &vMaxOut, TVrtIter vrtsBegin, TVrtIter vrtsEnd, Grid::AttachmentAccessor< Vertex, TAPosition > &aaPos) |
calculates the BoundingBox More... | |
template<class TVrtIter , class TAPosition > | |
UG_API TAPosition::ValueType | ug::CalculateCenter (TVrtIter vrtsBegin, TVrtIter vrtsEnd, Grid::AttachmentAccessor< Vertex, TAPosition > &aaPos) |
calculates the center of a set of vertices. More... | |
template<class TAAPosVRT > | |
UG_API void | ug::CalculateVertexNormal (vector3 &nOut, Grid &grid, Vertex *vrt, TAAPosVRT &aaPos) |
calculates the normal of a vertex using associated faces More... | |
bool | ug::CollectSurfaceNeighborsSorted (std::vector< Vertex * > &vNeighborsOut, Grid &grid, Vertex *v) |
Collects neighbor-vertices in either clockwise or counter clockwise order. More... | |
template<class TVrtContainer1 , class TVrtContainer2 > | |
UG_API bool | ug::CompareVertexContainer (const TVrtContainer1 &con1, const TVrtContainer2 &con2) |
compares vertices in a container More... | |
template<class vector_t , class TAAPos > | |
UG_API bool | ug::ContainsPoint (const Vertex *v, const vector_t &p, TAAPos aaPos) |
Returns true if the given point lies on the given vertex. More... | |
Vertex * | ug::FindVertexByCoordiante (vector3 &coord, VertexIterator iterBegin, VertexIterator iterEnd, Grid::VertexAttachmentAccessor< APosition > &aaPos) |
returns the vertex that is the closest to the given coordinate More... | |
template<size_t dim> | |
int | ug::FindVertexByCoordinate (const MathVector< dim > &coord, size_t ncoords, const MathVector< dim > vCoords[]) |
returns (non-unique?) index of closest vertex More... | |
Edge * | ug::GetConnectedEdge (Grid &g, Vertex *vrt, Face *tri) |
returns the edge in the triangle tri, which does not contain vrt. More... | |
Vertex * | ug::GetConnectedVertex (Edge *e, Vertex *v) |
returns the vertex that is connected to v via e. More... | |
Vertex * | ug::GetConnectedVertex (EdgeVertices *e, Face *f) |
returns the index of the first vertex that is contained in f and is not contained in e. More... | |
int | ug::GetConnectedVertexIndex (Face *f, const EdgeDescriptor &ed) |
returns the index of the first vertex that is contained in the specified face and is not contained in the given edge. More... | |
int | ug::GetConnectedVertexIndex (Face *f, const EdgeVertices *e) |
Vertex * | ug::GetSharedVertex (IVertexGroup *vrts0, IVertexGroup *vrts1) |
returns the first vertex of vrts0 that is also contained in vrts1 (or NULL if no such vertex exists) More... | |
size_t | ug::GetSharedVertices (std::vector< Vertex * > &vrtsOut, IVertexGroup *vrts0, IVertexGroup *vrts1) |
fills a vector with the vertices that are both contained in vrts0 and vrts1. More... | |
Vertex * | ug::GetVertex (Vertex *v, size_t i) |
returns the i'th vertex of a vertex More... | |
int | ug::GetVertexIndex (EdgeVertices *e, Vertex *v) |
returns the index at which vertex v is found in the given edge More... | |
int | ug::GetVertexIndex (FaceVertices *f, Vertex *v) |
returns the index at which vertex v is found in the given face More... | |
int | ug::GetVertexIndex (VolumeVertices *vol, Vertex *v) |
returns the index at which vertex v is found in the given volume More... | |
bool | ug::IsBoundaryVertex1D (Grid &grid, Vertex *v, Grid::edge_traits::callback cbConsiderEdge=ConsiderAll()) |
returns whether a vertex lies on the boundary of a polygonal chain. More... | |
bool | ug::IsBoundaryVertex2D (Grid &grid, Vertex *v) |
returns whether a vertex lies on the boundary of a 2D grid. More... | |
bool | ug::IsBoundaryVertex3D (Grid &grid, Vertex *v) |
returns true if a vertex lies on the boundary of a 3D grid. More... | |
bool | ug::IsRegularSurfaceVertex (Grid &grid, Vertex *v) |
returns true if the vertex lies inside a regular surface More... | |
bool | ug::LiesOnBoundary (Grid &grid, Vertex *v) |
returns true, if the vertex lies on a 1d, 2d or 3d boundary More... | |
void | ug::MarkFixedCreaseVertices (Grid &grid, SubsetHandler &sh, int creaseSI, int fixedSI) |
template<class TVrtIterator > | |
UG_API Vertex * | ug::MergeMultipleVertices (Grid &grid, TVrtIterator vrtsBegin, TVrtIterator vrtsEnd) |
Merges all vertices between the given iterators into a single vertex. More... | |
void | ug::MergeVertices (Grid &grid, Vertex *v1, Vertex *v2) |
merges two vertices and restructures the adjacent elements. More... | |
template<class TIterator , class TAAPos > | |
void | ug::MoveVertices (TIterator vrtsBegin, TIterator vrtsEnd, TAAPos aaPos, const typename TAAPos::ValueType &offset) |
moves vertices by the specified offset More... | |
int | ug::NumAssociatedEdges (Grid &grid, Vertex *v) |
returns the number of associated edges of the given vertex More... | |
int | ug::NumAssociatedFaces (Grid &grid, Vertex *v) |
returns the number of associated faces of the given vertex More... | |
size_t | ug::NumSharedVertices (IVertexGroup *vrts0, IVertexGroup *vrts1) |
Returns the number of shared vertices between vrts0 and vrts1. More... | |
template<class TAAPos > | |
UG_API void | ug::TransformVertex (Vertex *vrt, matrix33 &m, TAAPos &aaPos) |
transforms a vertex by a given matrix More... | |
template<class TIterator , class TAAPos > | |
UG_API void | ug::TransformVertices (TIterator vrtsBegin, TIterator vrtsEnd, matrix33 &m, TAAPos &aaPos) |
transforms all given vertices by a given matrix More... | |
template<class TAAPos > | |
UG_API number | ug::VertexDistance (Vertex *v0, Vertex *v1, TAAPos &aaPos) |
Returns the distance between two vertices. More... | |
template<class TAAPos > | |
UG_API number | ug::VertexDistanceSq (Vertex *v0, Vertex *v1, TAAPos &aaPos) |
Returns the squared distance between two vertices. More... | |
bool | ug::CalculateVertexNormals (Grid &grid, APosition &aPos, ANormal &aNorm) |
calculates the normals of all vertices in grid and stores them in aNorm. More... | |
bool | ug::CalculateVertexNormals (Grid &grid, Grid::AttachmentAccessor< Vertex, APosition > &aaPos, Grid::AttachmentAccessor< Vertex, ANormal > &aaNorm) |
calculates the normals of all vertices in grid and stores them in aNorm. More... | |
template<int dim, class TVrtIterator > | |
UG_API void | ug::RemoveDoubles (Grid &grid, const TVrtIterator &iterBegin, const TVrtIterator &iterEnd, Attachment< MathVector< dim > > &aPos, number threshold) |
merges all vertices that are closer to each other than the specified threshold. More... | |
template<int dim, class TVrtIterator , class TAAPos > | |
UG_API void | ug::RemoveDoubles (Grid &grid, const TVrtIterator &iterBegin, const TVrtIterator &iterEnd, TAAPos aaPos, number threshold) |
merges all vertices that are closer to each other than the specified threshold. More... | |
template<class TVertexPositionAttachmentAccessor > | |
UG_API TVertexPositionAttachmentAccessor::ValueType | ug::CalculateCenter (const Vertex *v, TVertexPositionAttachmentAccessor &aaPosVRT) |
returns the position of the vertex. More... | |
template<class TAAPosVRT , class TAAWeightVRT > | |
UG_API TAAPosVRT::ValueType | ug::CalculateCenter (const Vertex *v, TAAPosVRT &aaPos, TAAWeightVRT &aaWeight) |
returns the position of the vertex. More... | |
contains methods to manipulate vertices
UG_API TAPosition::ValueType ug::CalculateBarycenter | ( | TVrtIter | vrtsBegin, |
TVrtIter | vrtsEnd, | ||
Grid::VertexAttachmentAccessor< TAPosition > & | aaPos | ||
) |
calculates the barycenter of a set of vertices
References ug::VecAdd(), ug::VecScale(), and ug::VecSet().
UG_API void ug::CalculateBoundaryVertexNormal2D | ( | typename TAAPosVRT::ValueType & | nOut, |
Grid & | grid, | ||
Vertex * | vrt, | ||
TAAPosVRT & | aaPos | ||
) |
calculates the normal of a boundary vertex using associated faces
TAAPosVRT has to be an attachment accessor for the vector2 or vector3 type that works on the vertices in grid.
Note that this method makes only sense if called for a boundary vertex, which is connected to some volume elements.
The returned normal is normalized and will point outwards of the area defined by the associated volumes.
Note that this method assumes, that all faces do lie in the x-y-plane.
References ug::CollectAssociated(), ug::Face::edge_desc(), ug::EdgeContains(), ug::Grid::get_edge(), ug::IsBoundaryEdge2D(), ug::Face::num_sides(), ug::VecNormalize(), ug::VecSet(), and ug::EdgeVertices::vertex().
Referenced by ug::ExpandFractures2d().
UG_API void ug::CalculateBoundaryVertexNormal3D | ( | vector3 & | nOut, |
Grid & | grid, | ||
Vertex * | vrt, | ||
TAAPosVRT & | aaPos | ||
) |
calculates the normal of a boundary vertex using associated volumes
TAAPosVRT has to be an attachment accessor for the vector3 type that works on the vertices in grid.
Note that this method makes only sense if called for a boundary vertex, which is connected to some volume elements.
The returned normal is normalized and will point outwards of the area defined by the associated volumes.
References ug::CalculateNormal(), ug::CollectAssociated(), ug::Volume::face_desc(), ug::FaceContains(), ug::Grid::get_face(), ug::IsBoundaryFace3D(), ug::Volume::num_sides(), ug::VecAdd(), ug::VecNormalize(), and ug::VecSet().
Referenced by ug::ExpandFractures3d().
UG_API void ug::CalculateBoundingBox | ( | typename TAPosition::ValueType & | vMinOut, |
typename TAPosition::ValueType & | vMaxOut, | ||
TVrtIter | vrtsBegin, | ||
TVrtIter | vrtsEnd, | ||
Grid::AttachmentAccessor< Vertex, TAPosition > & | aaPos | ||
) |
calculates the BoundingBox
References dim.
UG_API TAAPosVRT::ValueType ug::CalculateCenter | ( | const Vertex * | v, |
TAAPosVRT & | aaPos, | ||
TAAWeightVRT & | aaWeight | ||
) |
returns the position of the vertex.
Main purpose is to allow the use of vertices in template-methods that call CalculateCenter
|
inline |
returns the position of the vertex.
Main purpose is to allow the use of vertices in template-methods that call CalculateCenter
UG_API TAPosition::ValueType ug::CalculateCenter | ( | TVrtIter | vrtsBegin, |
TVrtIter | vrtsEnd, | ||
Grid::AttachmentAccessor< Vertex, TAPosition > & | aaPos | ||
) |
calculates the center of a set of vertices.
The difference to CalculateBarycenter is that this method returns the center of the bounding box which contains the given set of vertices.
References ug::CalculateBoundingBox(), and ug::VecScaleAdd().
UG_API void ug::CalculateVertexNormal | ( | vector3 & | nOut, |
Grid & | grid, | ||
Vertex * | vrt, | ||
TAAPosVRT & | aaPos | ||
) |
calculates the normal of a vertex using associated faces
TAAPosVRT has to be an attachment accessor for the vector3 type that works on the vertices in grid.
References ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::CalculateNormal(), ug::VecAdd(), and ug::VecNormalize().
Referenced by ug::SlopeSmooth(), ug::SnapMarkerPointToGridVertex(), ug::Triangulate(), ug::TrySplit(), and ug::WeightedNormalSmooth().
calculates the normals of all vertices in grid and stores them in aNorm.
aPos has to be attached to grid. If some attachments were not attached correctly, the method returns false.
References ug::Grid::attach_to(), and ug::Grid::has_attachment().
UG_API bool ug::CalculateVertexNormals | ( | Grid & | grid, |
Grid::AttachmentAccessor< Vertex, APosition > & | aaPos, | ||
Grid::AttachmentAccessor< Vertex, ANormal > & | aaNorm | ||
) |
calculates the normals of all vertices in grid and stores them in aNorm.
aPos has to be attached to grid. If some attachments were not attached correctly, the method returns false.
References ug::Grid::begin(), ug::CalculateNormal(), ug::Grid::end(), ug::FaceVertices::num_vertices(), ug::VecAdd(), ug::VecNormalize(), and ug::FaceVertices::vertex().
Referenced by ug::AdjustEdgeLength().
UG_API bool ug::CollectSurfaceNeighborsSorted | ( | std::vector< Vertex * > & | vNeighborsOut, |
Grid & | grid, | ||
Vertex * | v | ||
) |
Collects neighbor-vertices in either clockwise or counter clockwise order.
Please note: This algorithm uses Grid::mark.
This method will only work if the triangles connected to the given vertex are homeomorphic to the unit-disc.
Current implementation requires FACEOPT_AUTOGENERATE_EDGES (could be avoided).
References ug::Grid::associated_edges_begin(), ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), ug::Grid::begin_marking(), ug::CollectEdges(), ug::EdgeContains(), ug::EDGEOPT_STORE_ASSOCIATED_FACES, ug::Grid::end_marking(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::GetAssociatedFaces(), ug::GetConnectedVertex(), ug::GetVertexIndex(), ug::Grid::is_marked(), ug::Grid::mark(), ug::FaceVertices::num_vertices(), ug::Grid::num_volumes(), ug::Grid::option_is_enabled(), and ug::FaceVertices::vertex().
Referenced by ug::ProjectToLimitPLoop().
UG_API bool ug::CompareVertexContainer | ( | const TVrtContainer1 & | con1, |
const TVrtContainer2 & | con2 | ||
) |
compares vertices in a container
If you want to compare Edge, Face, Volume, EdgeDescriptor, FaceDescriptor or VolumeDescriptor with other Edge, ... then please use CompareVertices instead.
TVrtContainer has to feature the following methods (or compatible ones): int size(): has to return the numbe of vertices in the container. Vertex* operator[](int index): has to return the i-th vertex.
Good types would be: EdgeVertices, FaceVertices, VolumeVertices, Edge, Face, Volume, ..., std::vector<Vertex*>, ...
returns true if con1 and con2 contain the same vertices.
UG_API bool ug::ContainsPoint | ( | const Vertex * | v, |
const vector_t & | p, | ||
TAAPos | aaPos | ||
) |
Returns true if the given point lies on the given vertex.
The method simply checks, whether coordinates are identical. This method is of no particular use, except for completeness regarding the use of ConatinsPoint in template-programming.
References p.
Vertex* ug::FindVertexByCoordiante | ( | vector3 & | coord, |
VertexIterator | iterBegin, | ||
VertexIterator | iterEnd, | ||
Grid::VertexAttachmentAccessor< APosition > & | aaPos | ||
) |
returns the vertex that is the closest to the given coordinate
returns NULL if no vertex was found (if iterBegin == iterEnd).
References ug::VecDistanceSq().
int ug::FindVertexByCoordinate | ( | const MathVector< dim > & | coord, |
size_t | ncoords, | ||
const MathVector< dim > | vCoords[] | ||
) |
returns (non-unique?) index of closest vertex
returns -1 iff ncoords == 0
References ug::VecDistance(), and ug::VecDistanceSq().
returns the edge in the triangle tri, which does not contain vrt.
Make sure that tri is a triangle!
References ug::Face::edge_desc(), ug::EdgeContains(), ug::Grid::get_edge(), and ug::Face::num_edges().
Referenced by ug::SlopeSmooth(), ug::TryCollapse(), and ug::WeightedFaceSmooth().
returns the vertex that is connected to v via e.
returns NULL if v is not contained in e.
References ug::EdgeVertices::vertex().
Referenced by ug::AdaptSurfaceGridToCylinder(), ug::CalculateSmoothCreaseManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), ug::CalculateSmoothManifoldPosInParentLevelLoopScheme(), ug::CollapseEdge(), ug::CollectConstraining(), ug::CollectNeighbors(), ug::CreatePolyChain(), ug::CreateQuadrilateral_NoRegistration(), ug::ExportGridToUG_2D(), ug::ExtrudeLayers(), ug::GetNextSectionOfPolyChain(), ug::DelaunayInfo< TAAPos >::init_marks(), ug::LaplacianSmooth(), ug::MakeDelaunay(), ug::MarkCorners(), ug::MinimizeEdgeLength_SwapsOnly(), ug::MultiEdgeSplit(), ug::SubdivisionProjector::new_vertex(), ug::ProjectToLimitPLoop(), ug::ProjectToLimitSubdivBoundary(), ug::QualityGridGeneration(), ug::SubdivisionProjector::refinement_begins(), ug::ReplaceByQuadrilaterals_EdgeBased(), ug::SelectKinkVertices(), ug::SelectSmoothEdgePath(), ug::SimplifyPolylines(), ug::SlopeSmooth(), ug::SplitIrregularPolyChain(), ug::WeightedEdgeSmooth(), and ug::WeightedNormalSmooth().
UG_API Vertex * ug::GetConnectedVertex | ( | EdgeVertices * | e, |
Face * | f | ||
) |
returns the index of the first vertex that is contained in f and is not contained in e.
References ug::FaceVertices::num_vertices(), ug::EdgeVertices::vertex(), and ug::FaceVertices::vertex().
Referenced by ug::CollectSurfaceNeighborsSorted().
UG_API int ug::GetConnectedVertexIndex | ( | Face * | f, |
const EdgeDescriptor & | ed | ||
) |
returns the index of the first vertex that is contained in the specified face and is not contained in the given edge.
References ug::GetConnectedVertexIndex().
Referenced by ug::ReplaceByQuadrilaterals_EdgeBased().
UG_API int ug::GetConnectedVertexIndex | ( | Face * | f, |
const EdgeVertices * | e | ||
) |
References ug::FaceVertices::num_vertices(), ug::EdgeVertices::vertex(), and ug::FaceVertices::vertex().
Referenced by ug::GetConnectedVertexIndex().
UG_API Vertex * ug::GetSharedVertex | ( | IVertexGroup * | vrts0, |
IVertexGroup * | vrts1 | ||
) |
returns the first vertex of vrts0 that is also contained in vrts1 (or NULL if no such vertex exists)
References ug::IVertexGroup::size(), and ug::IVertexGroup::vertices().
Referenced by ug::CollapseEdge().
size_t ug::GetSharedVertices | ( | std::vector< Vertex * > & | vrtsOut, |
IVertexGroup * | vrts0, | ||
IVertexGroup * | vrts1 | ||
) |
fills a vector with the vertices that are both contained in vrts0 and vrts1.
References ug::IVertexGroup::size(), and ug::IVertexGroup::vertices().
returns the i'th vertex of a vertex
This function simply returns the vertex itself. It is added for completeness, such that the function can be used in template code.
References UG_ASSERT.
Referenced by ug::CalculateBoundingBox(), ug::CollectCornerCoordinates(), ug::GridPointsOrdering< TDomain, TAlgebra >::count_sizes(), ug::VTKOutput< TDim >::count_sizes(), ug::MarkForRefinement_ContainsSurfaceNode(), ug::GridPointsOrdering< TDomain, TAlgebra >::number_points_elementwise(), ug::VTKOutput< TDim >::write_nodal_data_elementwise(), ug::VTKOutput< TDim >::write_nodal_values_elementwise(), and ug::VTKOutput< TDim >::write_points_elementwise().
UG_API int ug::GetVertexIndex | ( | EdgeVertices * | e, |
Vertex * | v | ||
) |
returns the index at which vertex v is found in the given edge
returns -1 if the vertex was not found.
References ug::EdgeVertices::vertex().
Referenced by ug::HangingNodeRefinerBase< TSelector >::assign_hnode_marks(), ug::CalculateConstrainedSmoothVolumePosInTopLevel(), ug::CalculateSmoothVolumePosInTopLevel(), ug::ComputeOrientationOffsetLagrange(), ug::CreateQuadrilateral_NoRegistration(), ug::FaceIsOnRightSide(), ug::FixEdgeOrientation(), ug::IRefiner::get_local_face_mark(), ug::GetRightLeftUnitIndex(), ug::ReplaceLowValenceVertices(), ug::ReplaceValence3Vertices(), and ug::WriteNG().
UG_API int ug::GetVertexIndex | ( | FaceVertices * | f, |
Vertex * | v | ||
) |
returns the index at which vertex v is found in the given face
returns -1 if the vertex was not found.
References ug::FaceVertices::num_vertices(), and ug::FaceVertices::vertex().
UG_API int ug::GetVertexIndex | ( | VolumeVertices * | vol, |
Vertex * | v | ||
) |
returns the index at which vertex v is found in the given volume
returns -1 if the vertex was not found.
References ug::VolumeVertices::num_vertices(), and ug::VolumeVertices::vertex().
Referenced by ug::CollectSurfaceNeighborsSorted().
UG_API bool ug::IsBoundaryVertex1D | ( | Grid & | grid, |
Vertex * | v, | ||
Grid::edge_traits::callback | cbConsiderEdge = ConsiderAll() |
||
) |
returns whether a vertex lies on the boundary of a polygonal chain.
The polygonal chain may be part of a bigger grid containing faces and volume elements. To distinguish which edges should be part of the polygonal chain, you may specify a callback to identify them.
References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::enable_options(), LOG, ug::Grid::option_is_enabled(), and ug::VRTOPT_STORE_ASSOCIATED_EDGES.
Referenced by ug::GetFirstSectionOfPolyChain(), and ug::LiesOnBoundary().
returns whether a vertex lies on the boundary of a 2D grid.
A vertex is regarded as a 2d boundary vertex if it lies on a 2d boundary edge. if EDGEOPT_STORE_ASSOCIATED_FACES and VRTOPT_STORE_ASSOCIATED_EDGES are enabled, the algorithm will be faster.
References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::enable_options(), ug::FACEOPT_AUTOGENERATE_EDGES, ug::IsBoundaryEdge2D(), LOG, ug::Grid::option_is_enabled(), and ug::VRTOPT_STORE_ASSOCIATED_EDGES.
Referenced by ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExportGridToUG_2D(), ug::LiesOnBoundary(), ug::ProjectToLimitPLoop(), and ug::ProjectToLimitSubdivBoundary().
returns true if a vertex lies on the boundary of a 3D grid.
A vertex is regarded as a 3d boundary vertex if it lies on a 3d boundary face. if FACEOPT_STORE_ASSOCIATED_VOLUMES and VRTOPT_STORE_ASSOCIATED_FACES are enabled, the algorithm will be faster.
References ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::enable_options(), ug::IsVolumeBoundaryFace(), LOG, ug::Grid::option_is_enabled(), ug::VOLOPT_AUTOGENERATE_FACES, and ug::VRTOPT_STORE_ASSOCIATED_FACES.
Referenced by ug::ArteExpandFracs3D::countAndSelectFracBaseNums(), ug::DistributeExpansionMarks3D(), ug::ExpandFractures3d(), ug::ArteExpandFracs3D::isVrtxSurroundedByFracFaces(), and ug::LiesOnBoundary().
returns true if the vertex lies inside a regular surface
This algorithm indirectly uses Grid::mark.
The vertex is regarded as a regular surface vertex, if all associated edges are connected to exactly 2 faces.
References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), and ug::NumAssociatedFaces().
returns true, if the vertex lies on a 1d, 2d or 3d boundary
References ug::IsBoundaryVertex1D(), ug::IsBoundaryVertex2D(), ug::IsBoundaryVertex3D(), and ug::Grid::num().
UG_API void ug::MarkFixedCreaseVertices | ( | Grid & | grid, |
SubsetHandler & | sh, | ||
int | creaseSI, | ||
int | fixedSI | ||
) |
Uses Grid::mark()
Vertices that are adjacent with more than two crease-edges are regarded as a fixed vertex.
References ug::GridSubsetHandler::assign_subset(), ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::GridSubsetHandler::begin(), ug::Grid::begin_marking(), ug::GridSubsetHandler::end(), ug::Grid::end_marking(), ug::ISubsetHandler::get_subset_index(), ug::Grid::is_marked(), ug::Grid::mark(), ug::GridSubsetHandler::num(), and ug::ISubsetHandler::num_subsets().
UG_API Vertex* ug::MergeMultipleVertices | ( | Grid & | grid, |
TVrtIterator | vrtsBegin, | ||
TVrtIterator | vrtsEnd | ||
) |
Merges all vertices between the given iterators into a single vertex.
Note that connected elements may be removed or replaced during this process. The method returns the remaining vertex in the given list (*vrtsBegin).
References ug::MergeVertices().
merges two vertices and restructures the adjacent elements.
Since vertex v2 has to be removed in the process, the associated elements of this vertex have to be replaced by new ones. Values attached to old elements are passed on to the new ones using grid::pass_on_values.
References ug::Grid::associated_edges_begin(), ug::Grid::associated_edges_end(), ug::Grid::associated_faces_begin(), ug::Grid::associated_faces_end(), ug::Grid::associated_volumes_begin(), ug::Grid::associated_volumes_end(), CollapseEdge(), ug::Grid::create_by_cloning(), ug::Grid::enable_options(), ug::Grid::erase(), ug::EraseConnectingElements(), ug::Grid::get_edge(), ug::Grid::get_face(), LOG, ug::Grid::num_edges(), ug::Grid::num_faces(), ug::FaceVertices::num_vertices(), ug::VolumeVertices::num_vertices(), ug::Grid::num_volumes(), ug::Grid::objects_will_be_merged(), ug::Grid::option_is_enabled(), ug::FaceDescriptor::set_num_vertices(), ug::VolumeDescriptor::set_num_vertices(), ug::FaceDescriptor::set_vertex(), ug::VolumeDescriptor::set_vertex(), ug::EdgeDescriptor::set_vertices(), ug::EdgeVertices::vertex(), ug::FaceVertices::vertex(), ug::VolumeVertices::vertex(), ug::VRTOPT_STORE_ASSOCIATED_EDGES, ug::VRTOPT_STORE_ASSOCIATED_FACES, and ug::VRTOPT_STORE_ASSOCIATED_VOLUMES.
Referenced by ug::MergeMultipleVertices(), ug::RemoveDoubles(), ug::ResolveEdgeEdgeIntersection(), ug::ResolveEdgeFaceIntersection(), and ug::ResolveVertexEdgeIntersection().
|
inline |
moves vertices by the specified offset
returns the number of associated edges of the given vertex
References ug::Grid::associated_elements(), and ug::PointerConstArray< TPtr >::size().
Referenced by ug::PerformTetrahedralization().
returns the number of associated faces of the given vertex
References ug::Grid::associated_elements(), and ug::PointerConstArray< TPtr >::size().
Referenced by ug::IsRegularSurfaceVertex().
size_t ug::NumSharedVertices | ( | IVertexGroup * | vrts0, |
IVertexGroup * | vrts1 | ||
) |
Returns the number of shared vertices between vrts0 and vrts1.
References ug::IVertexGroup::size(), and ug::IVertexGroup::vertices().
UG_API void ug::RemoveDoubles | ( | Grid & | grid, |
const TVrtIterator & | iterBegin, | ||
const TVrtIterator & | iterEnd, | ||
Attachment< MathVector< dim > > & | aPos, | ||
number | threshold | ||
) |
merges all vertices that are closer to each other than the specified threshold.
The current implementation sadly enforces some restrictions to the container from which iterBegin and iterEnd stem. Only Grid, MultiGrid, Selector, MGSelector, SubsetHandler, MGSubsetHandler and similar containers are allowed. This is due to an implementation detail in the algorithm that should be removed in future revisins.
References ug::Grid::has_vertex_attachment().
UG_API void ug::RemoveDoubles | ( | Grid & | grid, |
const TVrtIterator & | iterBegin, | ||
const TVrtIterator & | iterEnd, | ||
TAAPos | aaPos, | ||
number | threshold | ||
) |
merges all vertices that are closer to each other than the specified threshold.
The current implementation sadly enforces some restrictions to the container from which iterBegin and iterEnd stem. Only Grid, MultiGrid, Selector, MGSelector, SubsetHandler, MGSubsetHandler and similar containers are allowed. This is due to an implementation detail in the algorithm that should be removed in future revisins.
References ug::Grid::attach_to_vertices(), ug::KDTreeStatic< TPositionAttachment, numDimensions, TVector >::create_from_grid(), ug::Grid::detach_from_vertices(), ug::KDTreeStatic< TPositionAttachment, numDimensions, TVector >::get_neighbourhood(), ug::KDSD_LARGEST, ug::MergeVertices(), ug::Grid::num_vertices(), and ug::VecDistanceSq().
|
inline |
transforms a vertex by a given matrix
References ug::MatVecMult().
Referenced by ug::TransformVertices().
|
inline |
transforms all given vertices by a given matrix
References ug::TransformVertex().
UG_API number ug::VertexDistance | ( | Vertex * | v0, |
Vertex * | v1, | ||
TAAPos & | aaPos | ||
) |
Returns the distance between two vertices.
References ug::VecDistance().
Referenced by ug::is_anisotropic().
UG_API number ug::VertexDistanceSq | ( | Vertex * | v0, |
Vertex * | v1, | ||
TAAPos & | aaPos | ||
) |
Returns the squared distance between two vertices.
References ug::VecDistanceSq().
Referenced by ug::MinimizeEdgeLength_SwapsOnly().