|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Consists of functions to test intersection among geometric primitives. More...
#include "axom/config.hpp"#include "axom/core/Macros.hpp"#include "axom/core/utilities/Utilities.hpp"#include "axom/primal/constants.hpp"#include "axom/primal/geometry/BoundingBox.hpp"#include "axom/primal/geometry/OrientedBoundingBox.hpp"#include "axom/primal/geometry/Plane.hpp"#include "axom/primal/geometry/Point.hpp"#include "axom/primal/geometry/Polygon.hpp"#include "axom/primal/geometry/Ray.hpp"#include "axom/primal/geometry/Line.hpp"#include "axom/primal/geometry/Segment.hpp"#include "axom/primal/geometry/Sphere.hpp"#include "axom/primal/geometry/Tetrahedron.hpp"#include "axom/primal/geometry/Triangle.hpp"#include "axom/primal/geometry/BezierCurve.hpp"#include "axom/primal/geometry/BezierPatch.hpp"#include "axom/primal/geometry/NURBSCurve.hpp"#include "axom/primal/geometry/NURBSPatch.hpp"#include "axom/primal/operators/detail/intersect_impl.hpp"#include "axom/primal/operators/detail/intersect_ray_impl.hpp"#include "axom/primal/operators/detail/intersect_bounding_box_impl.hpp"#include "axom/primal/operators/detail/intersect_bezier_impl.hpp"#include "axom/primal/operators/detail/intersect_patch_impl.hpp"Namespaces | |
| axom | |
| axom::primal | |
Functions | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 3 > &ray, const BezierPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol, double EPS, bool isHalfOpen, bool &success) |
| Determines if a ray intersects a Bezier patch. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 3 > &ray, const BezierPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol=1e-8, double EPS=1e-8, bool isHalfOpen=false) |
| ! More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Line< T, 3 > &line, const BezierPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol, double EPS, bool isHalfOpen, bool &success) |
| Determines if a line (two-sided ray) intersects a Bezier patch. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Line< T, 3 > &line, const BezierPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol=1e-8, double EPS=1e-8, bool isHalfOpen=false) |
| ! More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 3 > &ray, const NURBSPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol, double EPS, bool countUntrimmed, bool isHalfOpen, bool &success) |
| Determines if a ray intersects a NURBS patch. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 3 > &ray, const NURBSPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol=1e-8, double EPS=1e-8, bool countUntrimmed=true, bool isHalfOpen=false) |
| ! More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Line< T, 3 > &line, const NURBSPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol, double EPS, bool countUntrimmed, bool isHalfOpen, bool &success) |
| Determines if a line (two-sided ray) intersects a NURBS patch. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Line< T, 3 > &line, const NURBSPatch< T, 3 > &patch, axom::Array< T > &t, axom::Array< T > &u, axom::Array< T > &v, double tol=1e-8, double EPS=1e-8, bool countUntrimmed=true, bool isHalfOpen=false) |
| ! More... | |
Triangle Intersection Routines | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Triangle< T, 3 > &t1, const Triangle< T, 3 > &t2, bool includeBoundary=false, double EPS=1E-08) |
| Tests if 3D Triangles t1 and t2 intersect. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Triangle< T, 2 > &t1, const Triangle< T, 2 > &t2, bool includeBoundary=false, double EPS=1E-08) |
| Tests if 2D Triangles t1 and t2 intersect. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const BoundingBox< T, 3 > &bb) |
| Determines if a triangle and a bounding box intersect. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const Ray< T, 3 > &ray) |
| Determines if a 3D triangle intersects a 3D ray. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const Ray< T, 3 > &ray, T &t) |
| Determines if a 3D triangle intersects a 3D ray. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const Ray< T, 3 > &ray, T &t, Point< double, 3 > &p) |
| Determines if a 3D triangle intersects a 3D ray. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const Segment< T, 3 > &seg) |
| Determines if a 3D triangle intersects a 3D segment. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const Segment< T, 3 > &seg, T &t) |
| Determines if a 3D triangle intersects a 3D segment. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Triangle< T, 3 > &tri, const Segment< T, 3 > &seg, T &t, Point< double, 3 > &p) |
| Determines if a 3D triangle intersects a 3D segment. More... | |
Ray Intersection Routines | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Ray< T, 2 > &R, const Segment< T, 2 > &S, T &ray_param, T &seg_param, const T EPS=1e-8) |
| Computes the intersection of the given ray, R, with the segment, S. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 2 > &R, const Segment< T, 2 > &S, T &ray_param) |
| Computes the intersection of the given ray, R, with the segment, S. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Ray< T, 2 > &R, const Segment< T, 2 > &S) |
| Computes the intersection of the given ray, R, with the segment, S. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 2 > &R, const Segment< T, 2 > &S, Point< T, 2 > &ip, const T EPS=1e-8) |
| Computes the intersection of the given ray, R, with the segment, S. More... | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Ray< T, DIM > &R, const BoundingBox< T, DIM > &bb, Point< T, DIM > &ip) |
| Computes the intersection of the given ray, R, with the Box, bb. More... | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Ray< T, DIM > &R, const BoundingBox< T, DIM > &bb) |
| Computes the intersection of the given ray, R, with the Box, bb. More... | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Line< T, DIM > &L, const BoundingBox< T, DIM > &bb, Point< T, DIM > &ip) |
| Computes the intersection of the given line, L, with the Box, bb. More... | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Line< T, DIM > &L, const BoundingBox< T, DIM > &bb) |
| Computes the intersection of the given line, L, with the Box, bb. More... | |
Segment-BoundingBox Intersection Routines | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Segment< T, DIM > &S, const BoundingBox< T, DIM > &bb, T &tmin, T &tmax, const double &EPS=1e-8) |
| Computes the intersection of the given segment, S, with the Box, bb. If an intersection is found, output parameter ip contains an intersection point. More... | |
| template<typename T , int DIM> | |
| bool | axom::primal::intersect (const Segment< T, DIM > &S, const BoundingBox< T, DIM > &bb, Point< T, DIM > &ip, const double &EPS=1e-8) |
| This variant returns a point within the intersection as an OUT parameters. More... | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Segment< T, DIM > &S, const BoundingBox< T, DIM > &bb) |
Axis-Aligned Bounding Box Intersection Routines | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const BoundingBox< T, DIM > &bb1, const BoundingBox< T, DIM > &bb2) |
| Determines if two axis aligned bounding boxes intersect. More... | |
Sphere Intersection Routines | |
| template<typename T , int DIM> | |
| bool | axom::primal::intersect (const Sphere< T, DIM > &s1, const Sphere< T, DIM > &s2, double TOL=1.e-9) |
| Determines if two spheres intersect. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Sphere< T, 2 > &circle, const BoundingBox< T, 2 > &bb) |
| Determines if a 2D sphere intersects (overlaps with) a bounding box. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Sphere< T, 2 > &circle, const NURBSCurve< T, 2 > &curve, axom::Array< T > &circle_params, axom::Array< T > &curve_params, double tol=1e-8, double EPS=1e-8) |
| Determines if a 2D sphere intersects a NURBS Curve. More... | |
Oriented Bounding Box Intersection Routines | |
| template<typename T > | |
| bool | axom::primal::intersect (const OrientedBoundingBox< T, 1 > &b1, const OrientedBoundingBox< T, 1 > &b2) |
| template<typename T > | |
| bool | axom::primal::intersect (const OrientedBoundingBox< T, 2 > &b1, const OrientedBoundingBox< T, 2 > &b2) |
| Determines if a 2D OBB intersects a 2D OBB. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const OrientedBoundingBox< T, 3 > &b1, const OrientedBoundingBox< T, 3 > &b2, double EPS=1E-4) |
| Determines if a 3D OBB intersects a 3D OBB. More... | |
Bezier Curve Intersection Routines | |
| template<typename T > | |
| bool | axom::primal::intersect (const BezierCurve< T, 2 > &c1, const BezierCurve< T, 2 > &c2, axom::Array< T > &sp, axom::Array< T > &tp, double tol=1E-8) |
| Tests if two Bezier Curves c1 and c2 intersect. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 2 > &r, const BezierCurve< T, 2 > &c, axom::Array< T > &rp, axom::Array< T > &cp, double tol=1E-8, double EPS=1E-8) |
| Function to find intersections between a ray and a Bezier curve. More... | |
| template<typename T > | |
| bool | axom::primal::intersect (const Ray< T, 2 > &r, const NURBSCurve< T, 2 > &n, axom::Array< T > &rp, axom::Array< T > &np, double tol=1E-8, double EPS=1E-8) |
| Function to find intersections between a ray and a NURBS curve. More... | |
Plane Intersection Routines | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Plane< T, 3 > &p, const BoundingBox< T, 3 > &bb, bool checkOverlaps=false, double EPS=1E-08) |
| Determines if a 3D plane intersects a 3D bounding box. By default (checkOverlaps is false), checks if |s| <= r, where "s" is the distance of the bounding box center to the plane, and "r" is the projected radius of the bounding box along the line parallel to the plane normal and going through the box center. If checkOverlaps is true, checks if |s| < r, where the bounding box overlaps both half spaces of the plane. More... | |
| template<typename T , int DIM> | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Plane< T, DIM > &plane, const Segment< T, DIM > &seg, T &t, const double &EPS=1e-12) |
| Determines if a plane intersects a segment. More... | |
| template<typename T > | |
| AXOM_HOST_DEVICE bool | axom::primal::intersect (const Plane< T, 3 > &p, const Tetrahedron< T, 3 > &tet, Polygon< T, 3 > &intersection) |
| Determines if a 3D plane intersects a tetrahedron. More... | |
Consists of functions to test intersection among geometric primitives.