![]() |
GemaCoreLib
The GeMA Core library
|
Utilitary functions for working with geometry. More...
Go to the source code of this file.
Namespaces | |
GmGeometryUtils | |
Groups utilitary routines for working with geometry. | |
Functions | |
double | GmGeometryUtils::edgeLength (const GmVector &p1, const GmVector &p2) |
Calculates the length of the edge determined by points p1 and p2. | |
double | GmGeometryUtils::triangleArea (const GmVector &p1, const GmVector &p2, const GmVector &p3) |
Calculates the area of the triangle determined by points p1, p2 and p3 (2D or 3D), organized in CCW order. | |
double | GmGeometryUtils::quadArea (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4) |
Calculates the area of a quad defined by points p1 to p4 (2D or 3D), defined in CCW order. | |
double | GmGeometryUtils::hexahedronVolume (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, const GmVector &p6, const GmVector &p7, const GmVector &p8) |
Calculates the volume of the given hexahedron. Points follow the standard Hex cell definition. | |
double | GmGeometryUtils::tetrahedronVolume (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4) |
Calculates the volume of the given tetrahedron. Points follow the standard Tet cell definition. | |
double | GmGeometryUtils::wedgeVolume (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, const GmVector &p6) |
Calculates the volume of the given wedge. Points follow the standard Wedge cell definition. | |
double | GmGeometryUtils::pyramidVolume (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5) |
Calculates the volume of the given pyramid. Points follow the standard pyramid cell definition. | |
void | GmGeometryUtils::edgeCentroid (const GmVector &p1, const GmVector &p2, GmVector &coord) |
Returns the cartesian coordinate of the edge centroid. | |
void | GmGeometryUtils::triangleCentroid (const GmVector &p1, const GmVector &p2, const GmVector &p3, GmVector &coord) |
Returns the cartesian coordinate of the triangle centroid. | |
void | GmGeometryUtils::quadCentroid (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, GmVector &coord) |
Returns the cartesian coordinate of the quad centroid. | |
void | GmGeometryUtils::hexahedronCentroid (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, const GmVector &p6, const GmVector &p7, const GmVector &p8, GmVector &coord) |
void | GmGeometryUtils::tetrahedronCentroid (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, GmVector &coord) |
Returns the cartesian coordinate of the tetrahedron centroid. | |
void | GmGeometryUtils::wedgeCentroid (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, const GmVector &p6, GmVector &coord) |
Returns the cartesian coordinate of the wedge centroid. | |
void | GmGeometryUtils::pyramidCentroid (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4, const GmVector &p5, GmVector &coord) |
Returns the cartesian coordinate of the pyramid centroid. | |
bool | GmGeometryUtils::tri3DIsColinear (const GmMatrix &X, double eps) |
bool | GmGeometryUtils::polygon3DIsPlanar (const GmMatrix &X, double tol) |
Returns true if the polygon delimited by the cell vertices is planar. More... | |
bool | GmGeometryUtils::polygon2DIsCCW (const GmMatrix &X) |
Returns true if the polygon delimited by the cell vertices is oriented CCW. More... | |
bool | GmGeometryUtils::polygon2DIsSelfIntersecting (const GmMatrix &X) |
Returns true if the polygon delimited by the cell vertices is self-intersecting, or false otherwise. More... | |
bool | GmGeometryUtils::polygonIsConvex (const GmMatrix &X) |
Returns true if the polygon delimited by the cell vertices is convex, or false otherwise. More... | |
bool | GmGeometryUtils::pointInConvexPolygon (const GmMatrix &X, const GmVector &p) |
Returns true if the point p is inside the polygon delimited by the cell vertices (convex hull), or false otherwise. More... | |
bool | GmGeometryUtils::pointInTesselatedPolygon_T6 (const GmMatrix &X, const GmVector &p) |
Returns true if the point p is inside the tesselated T6 polygon or false otherwise. More... | |
bool | GmGeometryUtils::pointInTesselatedPolygon_Q8 (const GmMatrix &X, const GmVector &p) |
Returns true if the point p is inside the tesselated Q8 polygon or false otherwise. More... | |
bool | GmGeometryUtils::pointInPolygon (const GmMatrix &X, const GmCellGeometry &g, const GmVector &p) |
Returns true if the point p is inside the polygon delimited by the cell vertices, or false otherwise. More... | |
bool | GmGeometryUtils::pointInTetrahedron (const GmMatrix &X, const GmVector &p) |
Returns true if the point p is inside the tetrahedron, or false otherwise. The X matrix should be the node matrix for a GeMA TET4 element with nodes in columns. | |
bool | GmGeometryUtils::pointInHexahedron (const GmMatrix &X, const GmVector &p) |
double | GmGeometryUtils::pointToConvexPolygon (const GmMatrix &X, const GmVector &p, GmVector &proj) |
Returns the dquared distance of point p to the polygon delimited by the cell vertices (convex hull) and fills the coordinates of the corresponding projected point on cell. More... | |
double | GmGeometryUtils::pointToTetrahedron (const GmMatrix &X, const GmVector &p, GmVector &proj) |
Returns the squared distance of point p to the tetrahedron delimited by its vertices and fills the coordinates of the corresponding projected point on tetrahedron. More... | |
GmMatrix | GmGeometryUtils::shuffle (const GmMatrix &X, const int order[], int size) |
Returns quad8 vertices in circular order. More... | |
bool | GmGeometryUtils::hex27ValidFacesCenter (const GmMatrix &X, double tol) |
Returns true if face center point is collinear with the face. Assumes that the quad faces are planar. | |
bool | GmGeometryUtils::hex20ValidEdges (const GmMatrix &X, double proportion_max) |
Returns true if the points defined between the edges of hex20 follows: 1) Their projection to the 3d line containing the edge is within the edge, i.e., their parametrization is in (0,1) 2) The distance to the projection is not greater than a proportion of the edge length. | |
bool | GmGeometryUtils::hex8PlanarFaces (const GmMatrix &X, double tol) |
bool | GmGeometryUtils::hex8IsWellDefined (const GmMatrix &X) |
bool | GmGeometryUtils::tet10ValidEdges (const GmMatrix &X, double proportion_max) |
bool | GmGeometryUtils::tet4IsWellDefined (const GmVector &p1, const GmVector &p2, const GmVector &p3, const GmVector &p4) |
bool | GmGeometryUtils::pyra5IsWellDefined (const GmMatrix &X, double tol) |
bool | GmGeometryUtils::pyra13ValidEdges (const GmMatrix &X, double proportion_max) |
bool | GmGeometryUtils::wedge6IsWellDefined (const GmMatrix &X, double tol) |
bool | GmGeometryUtils::wedge15ValidEdges (const GmMatrix &X, double proportion_max) |
bool | GmGeometryUtils::isCoplanar3D (const GmVector &a, const GmVector &b, const GmVector &c, const GmVector &d, double tol) |
GmMatrix | GmGeometryUtils::get2DProjectionMatRow (const GmMatrix &X) |
Returns a 3x2 (transposed) rigid transform matrix taking v1-origin and v2-origin 3D vectors to the 2D xy plane. | |
GmMatrix | GmGeometryUtils::get2DProjectionMatCol (const GmMatrix &X) |
Returns a 2x3 rigid transform matrix taking v1-origin and v2-origin 3D vectors to the 2D xy plane. | |
QVector< QVector< int > > | GmGeometryUtils::edgeFaceList (const QVector< QVector< int >> &faceEdgeList, int edgeCount) |
Returns a edgeFace Vector of faces indexed by edge Its input is the inverse map faceEdge Vector. | |
Utilitary functions for working with geometry.