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 | 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) |
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 257 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 188 of file GeometryUtils.C.
bool geom_utils::isPointZero | ( | const Point & | pt | ) |
Definition at line 17 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 33 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 78 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 108 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().
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 209 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 198 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 141 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 64 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 165 of file GeometryUtils.C.
Definition at line 52 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 228 of file GeometryUtils.C.
Point geom_utils::unitVector | ( | const Point & | pt, |
const std::string & | name | ||
) |
Definition at line 24 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 |