Functions | |
| bool | isPointZero (const libMesh::Point &pt) |
| Check whether a point is equal to zero. More... | |
| libMesh::Point | unitVector (const libMesh::Point &pt, const std::string &name) |
| Get the unit vector for a point parameter. More... | |
| libMesh::Point | rotatePointAboutAxis (const libMesh::Point &p, const libMesh::Real angle, const libMesh::Point &axis) |
| Rotate point about an axis. More... | |
| libMesh::Real | minDistanceToPoints (const libMesh::Point &pt, const std::vector< libMesh::Point > &candidates, const unsigned int axis) |
| Get the minimum distance from a point to another set of points, in the plane perpendicular to the specified axis. More... | |
| std::vector< libMesh::Point > | polygonCorners (const unsigned int num_sides, const libMesh::Real radius, const unsigned int axis) |
| Get the corner coordinates of a regular 2-D polygon, assuming a face of the polygon is parallel to the x0 axis. More... | |
| std::pair< unsigned int, unsigned int > | projectedIndices (const unsigned int axis) |
| Get the indices of the plane perpendicular to the specified axis. More... | |
| libMesh::Point | projectPoint (const libMesh::Real x0, const libMesh::Real x1, const unsigned int axis) |
| Given two coordinates, construct a point in the 2-D plane perpendicular to the specified axis. More... | |
| libMesh::Point | projectedUnitNormal (libMesh::Point pt1, libMesh::Point pt2, const unsigned int axis) |
| Get the unit normal vector between two points (which are first projected onto the plane perpendicular to the 'axis'), such that the cross product of the unit normal with the line from pt1 to pt2 has a positive 'axis' component. More... | |
| libMesh::Real | distanceFromLine (const libMesh::Point &pt, const libMesh::Point &line0, const libMesh::Point &line1) |
| Compute the distance from a 3-D line, provided in terms of two points on the line. More... | |
| libMesh::Real | projectedDistanceFromLine (libMesh::Point pt, libMesh::Point line0, libMesh::Point line1, const unsigned int axis) |
| Compute the distance from a 3-D line, provided in terms of two points on the line. More... | |
| libMesh::Real | projectedLineHalfSpace (libMesh::Point pt1, libMesh::Point pt2, libMesh::Point pt3, const unsigned int axis) |
| If positive, point is on the positive side of the half space (and vice versa). More... | |
| bool | pointInPolygon (const libMesh::Point &point, const std::vector< libMesh::Point > &corners, const unsigned int axis) |
| Whether a point is in 2-D a polygon in the plane perpendicular to the specified axis, given by corner points. More... | |
| bool | pointOnEdge (const libMesh::Point &point, const std::vector< libMesh::Point > &corners, const unsigned int axis) |
| Whether a point is on the edge of a 2-D polygon in the plane perpendicular to the specified axis, given its corner points. More... | |
| std::vector< libMesh::Point > | boxCorners (const libMesh::BoundingBox &box, const libMesh::Real factor) |
| Get corner points of a bounding box, with side length re-scaled. More... | |
| bool | arePointsColinear (const Point &p1, const Point &p2, const Point &p3) |
| Check if three points are colinear. More... | |
| bool | segmentsIntersect (const Point &p1, const Point &p2, const Point &p3, const Point &p4) |
| Check if the line segment p1-p2 intersects with line segment p3-p4 (only working in 2D (x-y plane)). More... | |
| Real | pointSegmentDistanceSq (const Point &point, const Point &a, const Point &b) |
| Compute the squared distance from a point to a 3-D line segment. More... | |
| Real | pointTriangleDistanceSq (const Point &point, const Point &v0, const Point &v1, const Point &v2) |
| Compute the squared distance from a point to a 3-D triangle. More... | |
| Real | solidAngle (const Point &point, const Point &v0, const Point &v1, const Point &v2) |
| Compute the signed solid angle subtended by one oriented triangle at the query point. More... | |
| bool | isPointZero (const Point &pt) |
| Point | unitVector (const Point &pt, const std::string &name) |
| Real | minDistanceToPoints (const Point &pt, const std::vector< Point > &candidates, const unsigned int axis) |
| Point | projectPoint (const Real x0, const Real x1, const unsigned int axis) |
| Real | projectedLineHalfSpace (Point pt1, Point pt2, Point pt3, const unsigned int axis) |
| bool | pointInPolygon (const Point &point, const std::vector< Point > &corners, const unsigned int axis) |
| bool | pointOnEdge (const Point &point, const std::vector< Point > &corners, const unsigned int axis) |
| Point | projectedUnitNormal (Point pt1, Point pt2, const unsigned int axis) |
| Real | distanceFromLine (const Point &pt, const Point &line0, const Point &line1) |
| Real | projectedDistanceFromLine (Point pt, Point line0, Point line1, const unsigned int axis) |
| std::vector< Point > | polygonCorners (const unsigned int num_sides, const Real radius, const unsigned int axis) |
| Point | rotatePointAboutAxis (const Point &p, const Real angle, const Point &axis) |
| std::vector< Point > | boxCorners (const libMesh::BoundingBox &box, const Real factor) |
| bool geom_utils::arePointsColinear | ( | const Point & | p1, |
| const Point & | p2, | ||
| const Point & | p3 | ||
| ) |
Check if three points are colinear.
| p1 | First point |
| p2 | Second point |
| p3 | Third point |
Definition at line 285 of file GeometryUtils.C.
Referenced by BoundaryLayerUtils::collectExteriorVertexPointsFromMesh(), and segmentsIntersect().
| std::vector<libMesh::Point> geom_utils::boxCorners | ( | const libMesh::BoundingBox & | box, |
| const libMesh::Real | factor | ||
| ) |
Get corner points of a bounding box, with side length re-scaled.
| [in] | box | bounding box to start from |
| [in] | factor | by which to multiply the bounding box side |
| std::vector<Point> geom_utils::boxCorners | ( | const libMesh::BoundingBox & | box, |
| const Real | factor | ||
| ) |
Definition at line 261 of file GeometryUtils.C.
| libMesh::Real geom_utils::distanceFromLine | ( | const libMesh::Point & | pt, |
| const libMesh::Point & | line0, | ||
| const libMesh::Point & | line1 | ||
| ) |
Compute the distance from a 3-D line, provided in terms of two points on the line.
| [in] | pt | point of interest |
| [in] | line0 | first point on line |
| [in] | line1 | second point on line |
Referenced by projectedDistanceFromLine().
| Real geom_utils::distanceFromLine | ( | const Point & | pt, |
| const Point & | line0, | ||
| const Point & | line1 | ||
| ) |
Definition at line 192 of file GeometryUtils.C.
| bool geom_utils::isPointZero | ( | const Point & | pt | ) |
Definition at line 21 of file GeometryUtils.C.
| bool geom_utils::isPointZero | ( | const libMesh::Point & | pt | ) |
Check whether a point is equal to zero.
| [in] | pt | point |
Referenced by unitVector().
| Real geom_utils::minDistanceToPoints | ( | const Point & | pt, |
| const std::vector< Point > & | candidates, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 37 of file GeometryUtils.C.
| libMesh::Real geom_utils::minDistanceToPoints | ( | const libMesh::Point & | pt, |
| const std::vector< libMesh::Point > & | candidates, | ||
| const unsigned int | axis | ||
| ) |
Get the minimum distance from a point to another set of points, in the plane perpendicular to the specified axis.
| [in] | pt | point |
| [in] | candidates | set of points we will find the nearest of |
| [in] | axis | axis perpendicular to the plane of the polygon |
| bool geom_utils::pointInPolygon | ( | const Point & | point, |
| const std::vector< Point > & | corners, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 82 of file GeometryUtils.C.
| bool geom_utils::pointInPolygon | ( | const libMesh::Point & | point, |
| const std::vector< libMesh::Point > & | corners, | ||
| const unsigned int | axis | ||
| ) |
Whether a point is in 2-D a polygon in the plane perpendicular to the specified axis, given by corner points.
| [in] | point | point of interest |
| [in] | corners | corner points of polygon |
| [in] | axis | axis perpendicular to the plane of the polygon |
| bool geom_utils::pointOnEdge | ( | const Point & | point, |
| const std::vector< Point > & | corners, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 112 of file GeometryUtils.C.
| bool geom_utils::pointOnEdge | ( | const libMesh::Point & | point, |
| const std::vector< libMesh::Point > & | corners, | ||
| const unsigned int | axis | ||
| ) |
Whether a point is on the edge of a 2-D polygon in the plane perpendicular to the specified axis, given its corner points.
| [in] | point | point of interest |
| [in] | corners | corner points of polygon |
| [in] | axis | axis perpendicular to the plane of the polygon |
Referenced by pointInPolygon().
| Real geom_utils::pointSegmentDistanceSq | ( | const Point & | point, |
| const Point & | a, | ||
| const Point & | b | ||
| ) |
Compute the squared distance from a point to a 3-D line segment.
| [in] | point | point of interest |
| [in] | a | first segment endpoint |
| [in] | b | second segment endpoint |
Definition at line 351 of file GeometryUtils.C.
Referenced by TriangleManifold::rayIntersectsTriangle().
| Real geom_utils::pointTriangleDistanceSq | ( | const Point & | point, |
| const Point & | v0, | ||
| const Point & | v1, | ||
| const Point & | v2 | ||
| ) |
Compute the squared distance from a point to a 3-D triangle.
| [in] | point | point of interest |
| [in] | v0 | first triangle vertex |
| [in] | v1 | second triangle vertex |
| [in] | v2 | third triangle vertex |
Definition at line 364 of file GeometryUtils.C.
| std::vector<libMesh::Point> geom_utils::polygonCorners | ( | const unsigned int | num_sides, |
| const libMesh::Real | radius, | ||
| const unsigned int | axis | ||
| ) |
Get the corner coordinates of a regular 2-D polygon, assuming a face of the polygon is parallel to the x0 axis.
| [in] | num_sides | number of sides to polygon |
| [in] | radius | distance from polygon center to a corner |
| [in] | axis | axis perpendicular to the plane of the polygon |
| std::vector<Point> geom_utils::polygonCorners | ( | const unsigned int | num_sides, |
| const Real | radius, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 213 of file GeometryUtils.C.
| libMesh::Real geom_utils::projectedDistanceFromLine | ( | libMesh::Point | pt, |
| libMesh::Point | line0, | ||
| libMesh::Point | line1, | ||
| const unsigned int | axis | ||
| ) |
Compute the distance from a 3-D line, provided in terms of two points on the line.
Both the input point and the points on the line are projected into the 2-d plane perpendicular to the specified axis.
| [in] | pt | point of interest |
| [in] | line0 | first point on line |
| [in] | line1 | second point on line |
| [in] | axis | axis index (0 = x, 1 = y, 2 = z) perpendicular to the projection plane |
Referenced by pointOnEdge().
| Real geom_utils::projectedDistanceFromLine | ( | Point | pt, |
| Point | line0, | ||
| Point | line1, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 202 of file GeometryUtils.C.
Get the indices of the plane perpendicular to the specified axis.
For example, if the axis is the y-axis (1), then this will return (0, 2), indicating that the coordinates of a general 3-D point once projected onto the x-z plane can be obtained with the 0 and 2 indices.
| [in] | axis | axis perpendicular to the projection plane |
Definition at line 145 of file GeometryUtils.C.
Referenced by minDistanceToPoints(), pointOnEdge(), projectedLineHalfSpace(), projectedUnitNormal(), and projectPoint().
| Real geom_utils::projectedLineHalfSpace | ( | Point | pt1, |
| Point | pt2, | ||
| Point | pt3, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 68 of file GeometryUtils.C.
| libMesh::Real geom_utils::projectedLineHalfSpace | ( | libMesh::Point | pt1, |
| libMesh::Point | pt2, | ||
| libMesh::Point | pt3, | ||
| const unsigned int | axis | ||
| ) |
If positive, point is on the positive side of the half space (and vice versa).
Because a 3-D line does not have a negative or positive "side," you must provide the 'axis' perpendicular to the plane into which the point and line are first projected.
| [in] | pt1 | point of interest |
| [in] | pt2 | one end point of line |
| [in] | pt3 | other end point of line |
| [in] | axis | axis perpendicular to plane onto which point and line are first projected |
Referenced by pointInPolygon().
| libMesh::Point geom_utils::projectedUnitNormal | ( | libMesh::Point | pt1, |
| libMesh::Point | pt2, | ||
| const unsigned int | axis | ||
| ) |
Get the unit normal vector between two points (which are first projected onto the plane perpendicular to the 'axis'), such that the cross product of the unit normal with the line from pt1 to pt2 has a positive 'axis' component.
| [in] | pt1 | first point for line |
| [in] | pt2 | second point for line |
| [in] | axis | project points onto plane perpendicular to this axis |
| Point geom_utils::projectedUnitNormal | ( | Point | pt1, |
| Point | pt2, | ||
| const unsigned int | axis | ||
| ) |
Definition at line 169 of file GeometryUtils.C.
Definition at line 56 of file GeometryUtils.C.
| libMesh::Point geom_utils::projectPoint | ( | const libMesh::Real | x0, |
| const libMesh::Real | x1, | ||
| const unsigned int | axis | ||
| ) |
Given two coordinates, construct a point in the 2-D plane perpendicular to the specified axis.
| [in] | x0 | first coordinate |
| [in] | x1 | second coordinate |
| [in] | axis | axis perpendicular to the projection plane |
Referenced by polygonCorners(), and projectedUnitNormal().
| libMesh::Point geom_utils::rotatePointAboutAxis | ( | const libMesh::Point & | p, |
| const libMesh::Real | angle, | ||
| const libMesh::Point & | axis | ||
| ) |
Rotate point about an axis.
| [in] | p | point |
| [in] | angle | angle to rotate (radians) |
| [in] | axis | axis expressed as vector |
Referenced by TransformedPositions::initialize().
| Point geom_utils::rotatePointAboutAxis | ( | const Point & | p, |
| const Real | angle, | ||
| const Point & | axis | ||
| ) |
Definition at line 232 of file GeometryUtils.C.
| bool geom_utils::segmentsIntersect | ( | const Point & | p1, |
| const Point & | p2, | ||
| const Point & | p3, | ||
| const Point & | p4 | ||
| ) |
Check if the line segment p1-p2 intersects with line segment p3-p4 (only working in 2D (x-y plane)).
| p1 | First point of first line segment |
| p2 | Second point of first line segment |
| p3 | First point of second line segment |
| p4 | Second point of second line segment |
Definition at line 295 of file GeometryUtils.C.
Referenced by BoundaryLayerUtils::generateOffsetPolyline().
| Real geom_utils::solidAngle | ( | const Point & | point, |
| const Point & | v0, | ||
| const Point & | v1, | ||
| const Point & | v2 | ||
| ) |
Compute the signed solid angle subtended by one oriented triangle at the query point.
| [in] | point | query point |
| [in] | v0 | first triangle vertex |
| [in] | v1 | second triangle vertex |
| [in] | v2 | third triangle vertex |
Definition at line 419 of file GeometryUtils.C.
Referenced by TriangleManifold::containsBySolidAngle().
| Point geom_utils::unitVector | ( | const Point & | pt, |
| const std::string & | name | ||
| ) |
Definition at line 28 of file GeometryUtils.C.
| libMesh::Point geom_utils::unitVector | ( | const libMesh::Point & | pt, |
| const std::string & | name | ||
| ) |
Get the unit vector for a point parameter.
| [in] | pt | point |
| [in] | name | name of the parameter |
1.8.14