Loading [MathJax]/extensions/tex2jax.js
ug4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
face_util.cpp File Reference
#include <vector>
#include <stack>
#include <cassert>
#include "vertex_util.h"
#include "face_util.h"
#include "../attachment_util.h"

Namespaces

namespace  ug
 the ug namespace
 

Functions

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
 
number ug::FaceQuality (FaceVertices *f, Grid::VertexAttachmentAccessor< APosition > aaPos)
 a simple measure for the quality of a face
 
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.
 
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.
 
int ug::NumAssociatedVolumes (Grid &grid, Face *f)
 returns the number of associated volumes of the specified face
 
number ug::TriangleQuality (vector3 &v1, vector3 &v2, vector3 &v3)
 a simple measure for the quality of a triangle
 
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.