ug4
Loading...
Searching...
No Matches
face_util.h File Reference

Go to the source code of this file.

Namespaces

namespace  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.
 
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
 
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.
 
void ug::CalculateNormal (vector3 &vNormOut, const FaceVertices *face, Grid::AttachmentAccessor< Vertex, APosition > &aaPos)
 calculates the normal of the given face
 
void ug::CalculateNormalNoNormalize (vector3 &vNormOut, FaceVertices *face, Grid::AttachmentAccessor< Vertex, APosition > &aaPos)
 calculates the normal of the given face
 
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.
 
template<class TAAPosVRT >
UG_API number ug::FaceArea (FaceVertices *f, TAAPosVRT &aaPos)
 Returns the area of a convex face.
 
template<class TIterator , class TAAPosVRT >
UG_API number ug::FaceArea (TIterator facesBegin, TIterator facesEnd, TAAPosVRT &aaPos)
 Returns the area sum of convex faces.
 
number ug::FaceQuality (FaceVertices *f, Grid::VertexAttachmentAccessor< APosition > aaPos)
 a simple measure for the quality of a face
 
template<class TIterator , class TAAPosVRT >
UG_API Faceug::FindSmallestFace (TIterator facesBegin, TIterator facesEnd, TAAPosVRT &aaPos)
 Returns the face with the smallest area.
 
int ug::GetFaceIndex (Volume *vol, Face *f)
 returns the index at which face f is found in the given object
 
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.
 
void ug::InsertCenterVertex (Grid &g, Face *f, Vertex *vrt, bool eraseOldFace)
 Refines the face by connecting its sides with the new center.
 
template<class TFace >
UG_API bool ug::IsBoundaryFace3D (Grid &grid, TFace *f)
 A wrapper for IsVolumeBoundaryFace.
 
template<class TAAPosVRT >
UG_API bool ug::IsDegenerated (Face *f, TAAPosVRT &aaPos, number threshold=SMALL)
 returns true if the given face is degenerated.
 
bool ug::IsVolumeBoundaryFace (Grid &grid, ConstrainedFace *f)
 returns true if the given face is a boundary face.
 
bool ug::IsVolumeBoundaryFace (Grid &grid, ConstrainingFace *f)
 returns true if the given face is a boundary face.
 
bool ug::IsVolumeBoundaryFace (Grid &grid, Face *f)
 returns true if the given face is a boundary face.
 
template<class TFace >
UG_API bool ug::LiesOnBoundary (Grid &grid, TFace *f)
 A wrapper for IsVolumeBoundaryFace.
 
int ug::NumAssociatedVolumes (Grid &grid, Face *f)
 returns the number of associated volumes of the specified face
 
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
 
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.
 
void ug::Triangulate (Grid &grid, QuadrilateralIterator iterBegin, QuadrilateralIterator iterEnd, Grid::VertexAttachmentAccessor< APosition > *paaPos=NULL)
 replaces all specified quadrilaterals by triangles.
 
template<class TVertexPositionAttachmentAccessor >
UG_API TVertexPositionAttachmentAccessor::ValueType ug::CalculateCenter (const FaceVertices *f, TVertexPositionAttachmentAccessor &aaPosVRT)
 calculates the center of a face.