ug4
edge_util.h File Reference

Go to the source code of this file.

Namespaces

 ug
 the ug namespace
 

Functions

template<class TAAPosVRT >
number ug::CalculateAverageEdgeLength (Grid &grid, TAAPosVRT &aaPos)
 Returns the average length of edges in the given grid. More...
 
template<class TVertexPositionAttachmentAccessor >
UG_API TVertexPositionAttachmentAccessor::ValueType ug::CalculateCenter (const Edge *e, TVertexPositionAttachmentAccessor &aaPosVRT)
 Calculates the center of an edge. More...
 
template<class TAAPosVRT , class TAAWeightVRT >
UG_API TAAPosVRT::ValueType ug::CalculateCenter (const EdgeVertices *e, TAAPosVRT &aaPos, TAAWeightVRT &aaWeight)
 returns the weighted center of the vertices of the given edge More...
 
int ug::CalculateNormal (vector3 &vNormOut, Grid &grid, Edge *e, Grid::AttachmentAccessor< Vertex, APosition > &aaPos, Grid::AttachmentAccessor< Face, ANormal > *paaNormFACE=NULL)
 Calculates the normal of the given edge. More...
 
int ug::CalculateNormalNoNormalize (vector3 &vNormOut, Grid &grid, Edge *e, Grid::VertexAttachmentAccessor< APosition > &aaPos, Grid::FaceAttachmentAccessor< ANormal > *paaNormFACE=NULL)
 Calculates the normal of the given edge. More...
 
bool ug::CollapseEdge (Grid &grid, Edge *e, Vertex *newVrt)
 Collapses the specified edge performs local grid restructuring. More...
 
template<class vector_t , class TAAPos >
UG_API bool ug::ContainsPoint (const EdgeVertices *e, const vector_t &p, TAAPos aaPos)
 Returns true if the given point lies on the given edge. More...
 
bool ug::CreateEdgeSplitGeometry (Grid &destGrid, Grid &srcGrid, Edge *e, Vertex *newVertex, AVertex *paAssociatedVertices=NULL)
 given an edge and a vertex (the split-vertex) this method constructs the split-geometry. More...
 
bool ug::CutEdgesWithPlane (Selector &sel, const vector3 &p, const vector3 &n, APosition &aPos=aPosition)
 refines all edges in sel which cut the given plane. More...
 
bool ug::EdgeCollapseIsValid (Grid &grid, Edge *e)
 Checks if an edge-collapse would invalidate the current topology. More...
 
template<class TAAPosVRT >
UG_API number ug::EdgeLength (const EdgeVertices *e, TAAPosVRT &aaPos)
 Calculates the length of the given edge. More...
 
template<class TAAPosVRT >
UG_API number ug::EdgeLengthSq (const EdgeVertices *e, TAAPosVRT &aaPos)
 Calculates the squared length of the given edge. More...
 
template<class TEdgeIterator , class TAAPosVRT >
UG_API Edge * ug::FindShortestEdge (TEdgeIterator edgesBegin, TEdgeIterator edgesEnd, TAAPosVRT &aaPos)
 Returns the shortest edge in a list of edges. More...
 
template<class TEdgeIterator >
UG_API void ug::FixEdgeOrientation (Grid &grid, TEdgeIterator edgesBegin, TEdgeIterator edgesEnd)
 creates uniform orientation of neighboured edges. More...
 
int ug::GetAssociatedFaces (Face **facesOut, Grid &grid, Edge *e, int maxNumFaces)
 writes associated faces of e to facesOut. More...
 
Edge * ug::GetConnectingEdge (Grid &grid, Face *f1, Face *f2)
 
int ug::GetEdgeIndex (Face *f, Edge *e)
 returns the index at which edge e is found in the given object More...
 
int ug::GetEdgeIndex (Volume *vol, Edge *e)
 returns the index at which edge e is found in the given object More...
 
template<class face_iter_t >
void ug::GetInnerEdgesOfFaceSoup (std::vector< Edge * > &edgesOut, Grid &g, face_iter_t facesBegin, face_iter_t facesEnd)
 
bool ug::IsBoundaryEdge (Grid &grid, Edge *e, Grid::face_traits::callback funcIsSurfFace)
 returns true if the edge is connected to exactly one surface face. More...
 
bool ug::IsBoundaryEdge2D (Grid &grid, Edge *e)
 returns whether an edge lies on the boundary of a 2D grid. More...
 
bool ug::IsBoundaryEdge3D (Grid &grid, Edge *e)
 returns whether an edge lies on the boundary of a 3D grid. More...
 
bool ug::LiesOnBoundary (Grid &grid, Edge *e)
 returns true, if the edge lies on a 2d or 3d boundary More...
 
template<class EdgeIterator , class TAAPos >
UG_API void ug::MinimizeEdgeLength_SwapsOnly (Grid &grid, EdgeIterator edgesBegin, EdgeIterator edgesEnd, TAAPos &aaPos)
 Transforms the given edge-set so that the sum of the length the edges is minimized. More...
 
int ug::NumAssociatedFaces (Grid &grid, Edge *e)
 returns the number of associated faces of the given edge More...
 
template<class TVertex >
TVertex * ug::SplitEdge (Grid &destGrid, Grid &srcGrid, Edge *e, AVertex *paAssociatedVertices=NULL, bool bConservative=false)
 inserts new triangles and one new vertex by splitting the specified edge. More...
 
template<class TVertex >
TVertex * ug::SplitEdge (Grid &grid, Edge *e, bool bConservative=false)
 inserts new triangles and one new vertex by splitting the specified edge. More...
 
Edge * ug::SwapEdge (Grid &grid, Edge *e)
 swaps e and thus reconnects its two adjacent triangles. More...
 
template<class TEdgeIterator >
UG_API void ug::AdjustEdgeOrientationToFaceOrientation (Grid &grid, TEdgeIterator edgesBegin, TEdgeIterator edgesEnd)
 Orientates boundary edges in the given edge set to the orientation of associated faces. More...
 
template<class TEdgeIterator >
UG_API void ug::AdjustEdgeOrientationToFaceOrientation (Grid &grid, TEdgeIterator edgesBegin, TEdgeIterator edgesEnd, Grid::face_traits::callback considerFace)
 Orientates boundary edges in the given edge set to the orientation of associated faces. More...