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/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/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"
Namespaces | |
axom | |
axom::primal | |
Functions | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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... | |
Segment-BoundingBox Intersection Routines | |
template<typename T , int DIM> | |
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> | |
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... | |
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, std::vector< T > &sp, std::vector< T > &tp, double tol=1E-8) |
Tests if two Bezier Curves c1 and c2 intersect. 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 > | |
AXOM_HOST_DEVICE bool | axom::primal::intersect (const Plane< T, 3 > &plane, const Segment< T, 3 > &seg, T &t) |
Determines if a 3D plane intersects a 3D 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.