ug4
face_util.h File Reference

Go to the source code of this file.

Namespaces

 ug
 the ug namespace
 

Functions

template<class TIterator >
UG_API number ug::AreaFaceQuality (TIterator facesBegin, TIterator facesEnd, Grid::VertexAttachmentAccessor< APosition > &aaPos)
 returns a value between 0 (bad) and 1 (good) that describes the quality of the area. More...
 
template<class TAAPosVRT , class TAAWeightVRT >
UG_API TAAPosVRT::ValueType ug::CalculateCenter (const FaceVertices *f, TAAPosVRT &aaPos, TAAWeightVRT &aaWeight)
 returns the weighted center of the vertices of the given face More...
 
void ug::CalculateFaceNormals (Grid &grid, const FaceIterator &facesBegin, const FaceIterator &facesEnd, AVector3 &aPos, AVector3 &aNorm)
 calculates the normal of each face. Presumes that all faces are flat. More...
 
void ug::CalculateNormal (vector3 &vNormOut, const FaceVertices *face, Grid::AttachmentAccessor< Vertex, APosition > &aaPos)
 calculates the normal of the given face More...
 
void ug::CalculateNormalNoNormalize (vector3 &vNormOut, FaceVertices *face, Grid::AttachmentAccessor< Vertex, APosition > &aaPos)
 calculates the normal of the given face More...
 
template<class vector_t , class TAAPos >
UG_API bool ug::ContainsPoint (const FaceVertices *f, const vector_t &p, TAAPos aaPos)
 Returns true if the given point lies inside the given face. More...
 
template<class TAAPosVRT >
UG_API number ug::FaceArea (FaceVertices *f, TAAPosVRT &aaPos)
 Returns the area of a convex face. More...
 
template<class TIterator , class TAAPosVRT >
UG_API number ug::FaceArea (TIterator facesBegin, TIterator facesEnd, TAAPosVRT &aaPos)
 Returns the area sum of convex faces. More...
 
number ug::FaceQuality (FaceVertices *f, Grid::VertexAttachmentAccessor< APosition > aaPos)
 a simple measure for the quality of a face More...
 
template<class TIterator , class TAAPosVRT >
UG_API Face * ug::FindSmallestFace (TIterator facesBegin, TIterator facesEnd, TAAPosVRT &aaPos)
 Returns the face with the smallest area. More...
 
int ug::GetFaceIndex (Volume *vol, Face *f)
 returns the index at which face f is found in the given object More...
 
void ug::GetNeighbours (std::vector< Face * > &vFacesOut, Grid &grid, Face *f, int side, bool clearContainer=true)
 collects neighbours of the given side of a face. More...
 
void ug::InsertCenterVertex (Grid &g, Face *f, Vertex *vrt, bool eraseOldFace)
 Refines the face by connecting its sides with the new center. More...
 
template<class TFace >
UG_API bool ug::IsBoundaryFace3D (Grid &grid, TFace *f)
 A wrapper for IsVolumeBoundaryFace. More...
 
template<class TAAPosVRT >
UG_API bool ug::IsDegenerated (Face *f, TAAPosVRT &aaPos, number threshold=SMALL)
 returns true if the given face is degenerated. More...
 
bool ug::IsVolumeBoundaryFace (Grid &grid, ConstrainedFace *f)
 returns true if the given face is a boundary face. More...
 
bool ug::IsVolumeBoundaryFace (Grid &grid, ConstrainingFace *f)
 returns true if the given face is a boundary face. More...
 
bool ug::IsVolumeBoundaryFace (Grid &grid, Face *f)
 returns true if the given face is a boundary face. More...
 
template<class TFace >
UG_API bool ug::LiesOnBoundary (Grid &grid, TFace *f)
 A wrapper for IsVolumeBoundaryFace. More...
 
int ug::NumAssociatedVolumes (Grid &grid, Face *f)
 returns the number of associated volumes of the specified face More...
 
template<class TAAPosVRT >
UG_API int ug::PointFaceTest (vector3 &v, Face *f, TAAPosVRT &aaPos)
 
template<class TTriangleIterator , class TAAPosVRT >
UG_API bool ug::ProjectPointToSurface (vector3 &vOut, const vector3 &v, const vector3 &n, TTriangleIterator trisBegin, TTriangleIterator trisEnd, TAAPosVRT &aaPos, bool compareNormals=false)
 
number ug::TriangleQuality (vector3 &v1, vector3 &v2, vector3 &v3)
 a simple measure for the quality of a triangle More...
 
UG_API void ug::Triangulate (Grid &grid, Grid::VertexAttachmentAccessor< APosition > *paaPos=NULL)
 
void ug::Triangulate (Grid &grid, Quadrilateral *q, Grid::VertexAttachmentAccessor< APosition > *paaPos=NULL)
 removes the quadrilateral and replaces it by two triangles. More...
 
void ug::Triangulate (Grid &grid, QuadrilateralIterator iterBegin, QuadrilateralIterator iterEnd, Grid::VertexAttachmentAccessor< APosition > *paaPos=NULL)
 replaces all specified quadrilaterals by triangles. More...
 
template<class TVertexPositionAttachmentAccessor >
UG_API TVertexPositionAttachmentAccessor::ValueType ug::CalculateCenter (const FaceVertices *f, TVertexPositionAttachmentAccessor &aaPosVRT)
 calculates the center of a face. More...