Set of intersection functions. More...
#include <vgl/vgl_fwd.h>#include <vgl/vgl_box_2d.h>#include <vgl/vgl_box_3d.h>#include <vgl/vgl_point_2d.h>#include <vgl/vgl_point_3d.h>#include <vgl/vgl_line_3d_2_points.h>#include <vgl/vgl_line_segment_3d.h>#include <vgl/vgl_infinite_line_3d.h>#include <vcl_vector.h>Go to the source code of this file.
Defines | |
| #define | VGL_INTERSECTION_INSTANTIATE(T) extern "please include vgl/vgl_intersection.txx first" |
| #define | VGL_INTERSECTION_BOX_INSTANTIATE(T) extern "please include vgl/vgl_intersection.txx first" |
Functions | |
| template<class T > | |
| bool | vgl_intersection (vgl_point_2d< T > const &p0, vgl_point_2d< T > const &p1) |
| Return true if the two points intersect, i.e., coincide. | |
| template<class T > | |
| bool | vgl_intersection (vgl_point_3d< T > const &p0, vgl_point_3d< T > const &p1) |
| Return true if the two points intersect, i.e., coincide. | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_2d< T > const &box, vgl_line_2d< T > const &line, vgl_point_2d< T > &p0, vgl_point_2d< T > &p1) |
| Return true if line intersects box. If so, compute intersection points. | |
| template<class T > | |
| unsigned | vgl_intersection (vgl_box_2d< T > const &box, vgl_line_segment_2d< T > const &line, vgl_point_2d< T > &p0, vgl_point_2d< T > &p1) |
| Returns the number of intersections of a line segment with a box, up to two are returned in p0 and p1. | |
| template<class T > | |
| vgl_point_3d< T > | vgl_intersection (vgl_line_3d_2_points< T > const &l1, vgl_line_3d_2_points< T > const &l2) |
| Return the intersection point of two concurrent lines. | |
| template<class T > | |
| bool | vgl_intersection (vgl_line_segment_3d< T > const &l1, vgl_line_segment_3d< T > const &l2, vgl_point_3d< T > &i_pnt) |
| Return the intersection point of segments of two concurrent lines. Returns false if the intersection point is not inside both line segments. | |
| template<class T > | |
| bool | vgl_intersection (vgl_line_3d_2_points< T > const &l1, vgl_line_segment_3d< T > const &l2, vgl_point_3d< T > &i_pnt) |
| Return the intersection point of segments of a concurrent line and line segment pair. Returns false if the intersection point is not inside both line segments. | |
| template<class T > | |
| bool | vgl_intersection (vgl_line_segment_3d< T > const &l1, vgl_line_3d_2_points< T > const &l2, vgl_point_3d< T > &i_pnt) |
| template<class T > | |
| bool | vgl_intersection (vgl_infinite_line_3d< T > const &l1, vgl_infinite_line_3d< T > const &l2, vgl_point_3d< T > &i_pnt) |
| Return the intersection point of infinite lines, if concurrent. | |
| template<class T > | |
| bool | vgl_intersection (vgl_line_2d< T > const &line0, vgl_line_2d< T > const &line1, vgl_point_2d< T > &intersection_point) |
| Return the intersection point of two lines. Return false if lines are parallel. | |
| template<class T > | |
| vgl_point_3d< T > | vgl_intersection (vgl_line_3d_2_points< T > const &line, vgl_plane_3d< T > const &plane) |
| Return the intersection point of a line and a plane. | |
| template<class T > | |
| bool | vgl_intersection (vgl_line_segment_3d< T > const &line, vgl_plane_3d< T > const &plane, vgl_point_3d< T > &i_pt) |
| Return the intersection point of a line and a plane. | |
| template<class T > | |
| bool | vgl_intersection (vgl_infinite_line_3d< T > const &line, vgl_plane_3d< T > const &plane, vgl_point_3d< T > &i_pt) |
| Return the intersection point of a line and a plane. | |
| template<class T > | |
| bool | vgl_intersection (vgl_plane_3d< T > const &plane0, vgl_plane_3d< T > const &plane1, vgl_line_segment_3d< T > &line) |
| Return the intersection line of two planes. | |
| template<class T > | |
| bool | vgl_intersection (vgl_plane_3d< T > const &plane0, vgl_plane_3d< T > const &plane1, vgl_line_3d_2_points< T > &line) |
| template<class T > | |
| bool | vgl_intersection (vgl_plane_3d< T > const &plane0, vgl_plane_3d< T > const &plane1, vgl_infinite_line_3d< T > &line) |
| Return the intersection line of two planes. Returns false if planes. | |
| template<class T > | |
| vgl_point_3d< T > | vgl_intersection (vgl_plane_3d< T > const &p1, vgl_plane_3d< T > const &p2, vgl_plane_3d< T > const &p3) |
| Return the intersection point of three planes. | |
| template<class T > | |
| bool | vgl_intersection (vgl_point_2d< T > const &p1, vgl_point_2d< T > const &p2, vgl_point_2d< T > const &q1, vgl_point_2d< T > const &q2, double tol=1e-6) |
| Return true if any point on [p1,p2] is within tol of [q1,q2]. | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_2d< T > const &b, vgl_point_2d< T > const &p) |
| Return true if the point lies inside the box. | |
| template<class T > | |
| bool | vgl_intersection (vgl_point_2d< T > const &p, vgl_box_2d< T > const &b) |
| Return true if the point lies inside the box. | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_3d< T > const &b, vgl_point_3d< T > const &p) |
| Return true if the point lies inside the box. | |
| template<class T > | |
| bool | vgl_intersection (vgl_point_3d< T > const &p, vgl_box_3d< T > const &b) |
| Return true if the point lies inside the box. | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_3d< T > const &box, vgl_infinite_line_3d< T > const &line, vgl_point_3d< T > &p0, vgl_point_3d< T > &p1) |
| Return true if line intersects box. If so, compute intersection points. | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_3d< T > const &b, vgl_plane_3d< T > const &plane) |
| Return true if a box and plane intersect in 3D. | |
| template<class T > | |
| vgl_box_2d< T > | vgl_intersection (vgl_box_2d< T > const &, vgl_box_2d< T > const &) |
| Return the intersection of two boxes (which is itself either a box, or empty). | |
| template<class T > | |
| vgl_box_3d< T > | vgl_intersection (vgl_box_3d< T > const &, vgl_box_3d< T > const &) |
| Return the intersection of two boxes (which is itself either a box, or empty). | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_2d< T > const &b, vgl_polygon< T > const &poly) |
| Return true if the box and polygon regions intersect, regions include boundaries. | |
| template<class T > | |
| vcl_vector< vgl_point_2d< T > > | vgl_intersection (vgl_box_2d< T > const &b, vcl_vector< vgl_point_2d< T > > const &p) |
| Return the points from the list that lie inside the box. | |
| template<class T > | |
| vcl_vector< vgl_point_2d< T > > | vgl_intersection (vcl_vector< vgl_point_2d< T > > const &p, vgl_box_2d< T > const &b) |
| Return the points from the list that lie inside the box. | |
| template<class T > | |
| vcl_vector< vgl_point_3d< T > > | vgl_intersection (vgl_box_3d< T > const &b, vcl_vector< vgl_point_3d< T > > const &p) |
| Return the points from the list that lie inside the box. | |
| template<class T > | |
| vcl_vector< vgl_point_3d< T > > | vgl_intersection (vcl_vector< vgl_point_3d< T > > const &p, vgl_box_3d< T > const &b) |
| Return the points from the list that lie inside the box. | |
Set of intersection functions.
For intersections of "homogeneous coordinates" objects like vgl_homg_line_2d<T>, see the static methods of vgl/algo/vgl_homg_operators_2d<T> and _3d.
Modifications
01 Mar 2007 - Gamze Tunali - split up into vgl/algo and vgl parts
21 Jul 2009 - Peter Vanroose - added box intersection (2d and 3d)
21 Jul 2009 - Peter Vanroose - added inlined point intersection functions
Definition in file vgl_intersection.h.
| #define VGL_INTERSECTION_BOX_INSTANTIATE | ( | T | ) | extern "please include vgl/vgl_intersection.txx first" |
Definition at line 266 of file vgl_intersection.h.
| #define VGL_INTERSECTION_INSTANTIATE | ( | T | ) | extern "please include vgl/vgl_intersection.txx first" |
Definition at line 265 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_point_2d< T > const & | p0, |
| vgl_point_2d< T > const & | p1 | ||
| ) | [inline] |
Return true if the two points intersect, i.e., coincide.
Definition at line 32 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_point_3d< T > const & | p0, |
| vgl_point_3d< T > const & | p1 | ||
| ) | [inline] |
Return true if the two points intersect, i.e., coincide.
Definition at line 39 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_box_2d< T > const & | box, |
| vgl_line_2d< T > const & | line, | ||
| vgl_point_2d< T > & | p0, | ||
| vgl_point_2d< T > & | p1 | ||
| ) |
Return true if line intersects box. If so, compute intersection points.
| unsigned vgl_intersection | ( | vgl_box_2d< T > const & | box, |
| vgl_line_segment_2d< T > const & | line, | ||
| vgl_point_2d< T > & | p0, | ||
| vgl_point_2d< T > & | p1 | ||
| ) |
Returns the number of intersections of a line segment with a box, up to two are returned in p0 and p1.
| vgl_point_3d< T > vgl_intersection | ( | vgl_line_3d_2_points< T > const & | l1, |
| vgl_line_3d_2_points< T > const & | l2 | ||
| ) |
Return the intersection point of two concurrent lines.
Allows intersection points outside the line segments Throws an assertion if lines not concurrent
Definition at line 418 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_line_segment_3d< T > const & | l1, |
| vgl_line_segment_3d< T > const & | l2, | ||
| vgl_point_3d< T > & | i_pnt | ||
| ) |
Return the intersection point of segments of two concurrent lines. Returns false if the intersection point is not inside both line segments.
Return the intersection point of segments of two concurrent lines.
Definition at line 441 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_line_3d_2_points< T > const & | l1, |
| vgl_line_segment_3d< T > const & | l2, | ||
| vgl_point_3d< T > & | i_pnt | ||
| ) |
Return the intersection point of segments of a concurrent line and line segment pair. Returns false if the intersection point is not inside both line segments.
Return the intersection point of segments of two concurrent lines.
Definition at line 462 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_line_segment_3d< T > const & | l1, |
| vgl_line_3d_2_points< T > const & | l2, | ||
| vgl_point_3d< T > & | i_pnt | ||
| ) | [inline] |
Definition at line 84 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_infinite_line_3d< T > const & | l1, |
| vgl_infinite_line_3d< T > const & | l2, | ||
| vgl_point_3d< T > & | i_pnt | ||
| ) |
Return the intersection point of infinite lines, if concurrent.
Return the intersection point of two lines, if concurrent.
Definition at line 482 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_line_2d< T > const & | line0, |
| vgl_line_2d< T > const & | line1, | ||
| vgl_point_2d< T > & | intersection_point | ||
| ) |
Return the intersection point of two lines. Return false if lines are parallel.
Definition at line 616 of file vgl_intersection.txx.
| vgl_point_3d< T > vgl_intersection | ( | vgl_line_3d_2_points< T > const & | line, |
| vgl_plane_3d< T > const & | plane | ||
| ) |
Return the intersection point of a line and a plane.
Definition at line 498 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_line_segment_3d< T > const & | line, |
| vgl_plane_3d< T > const & | plane, | ||
| vgl_point_3d< T > & | i_pt | ||
| ) |
Return the intersection point of a line and a plane.
Definition at line 538 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_infinite_line_3d< T > const & | line, |
| vgl_plane_3d< T > const & | plane, | ||
| vgl_point_3d< T > & | i_pt | ||
| ) |
Return the intersection point of a line and a plane.
Definition at line 578 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_plane_3d< T > const & | plane0, |
| vgl_plane_3d< T > const & | plane1, | ||
| vgl_line_segment_3d< T > & | line | ||
| ) |
Return the intersection line of two planes.
Returns false if planes are effectively parallel
Definition at line 136 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_plane_3d< T > const & | plane0, |
| vgl_plane_3d< T > const & | plane1, | ||
| vgl_line_3d_2_points< T > & | line | ||
| ) |
Definition at line 147 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_plane_3d< T > const & | plane0, |
| vgl_plane_3d< T > const & | plane1, | ||
| vgl_infinite_line_3d< T > & | line | ||
| ) |
Return the intersection line of two planes. Returns false if planes.
are effectively parallel
Definition at line 641 of file vgl_intersection.txx.
| vgl_point_3d< T > vgl_intersection | ( | vgl_plane_3d< T > const & | p1, |
| vgl_plane_3d< T > const & | p2, | ||
| vgl_plane_3d< T > const & | p3 | ||
| ) |
Return the intersection point of three planes.
Definition at line 720 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_point_2d< T > const & | p1, |
| vgl_point_2d< T > const & | p2, | ||
| vgl_point_2d< T > const & | q1, | ||
| vgl_point_2d< T > const & | q2, | ||
| double | tol | ||
| ) |
Return true if any point on [p1,p2] is within tol of [q1,q2].
Tests two line segments for intersection or near intersection (within given tolerance).
Definition at line 733 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_box_2d< T > const & | b, |
| vgl_point_2d< T > const & | p | ||
| ) | [inline] |
Return true if the point lies inside the box.
Definition at line 185 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_point_2d< T > const & | p, |
| vgl_box_2d< T > const & | b | ||
| ) | [inline] |
Return true if the point lies inside the box.
Definition at line 192 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_box_3d< T > const & | b, |
| vgl_point_3d< T > const & | p | ||
| ) | [inline] |
Return true if the point lies inside the box.
Definition at line 199 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_point_3d< T > const & | p, |
| vgl_box_3d< T > const & | b | ||
| ) | [inline] |
Return true if the point lies inside the box.
Definition at line 206 of file vgl_intersection.h.
| bool vgl_intersection | ( | vgl_box_3d< T > const & | box, |
| vgl_infinite_line_3d< T > const & | line, | ||
| vgl_point_3d< T > & | p0, | ||
| vgl_point_3d< T > & | p1 | ||
| ) |
Return true if line intersects box. If so, compute intersection points.
Definition at line 48 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_box_3d< T > const & | b, |
| vgl_plane_3d< T > const & | plane | ||
| ) |
Return true if a box and plane intersect in 3D.
Definition at line 165 of file vgl_intersection.txx.
| vgl_box_2d< T > vgl_intersection | ( | vgl_box_2d< T > const & | b1, |
| vgl_box_2d< T > const & | b2 | ||
| ) |
Return the intersection of two boxes (which is itself either a box, or empty).
Return the intersection of two boxes (which is itself is a box, possibly the empty box).
Definition at line 35 of file vgl_intersection.txx.
| vgl_box_3d< T > vgl_intersection | ( | vgl_box_3d< T > const & | b1, |
| vgl_box_3d< T > const & | b2 | ||
| ) |
Return the intersection of two boxes (which is itself either a box, or empty).
Definition at line 197 of file vgl_intersection.txx.
| bool vgl_intersection | ( | vgl_box_2d< T > const & | b, |
| vgl_polygon< T > const & | poly | ||
| ) |
Return true if the box and polygon regions intersect, regions include boundaries.
Definition at line 826 of file vgl_intersection.txx.
| vcl_vector< vgl_point_2d< T > > vgl_intersection | ( | vgl_box_2d< T > const & | b, |
| vcl_vector< vgl_point_2d< T > > const & | p | ||
| ) |
Return the points from the list that lie inside the box.
Definition at line 873 of file vgl_intersection.txx.
| vcl_vector< vgl_point_2d< T > > vgl_intersection | ( | vcl_vector< vgl_point_2d< T > > const & | p, |
| vgl_box_2d< T > const & | b | ||
| ) |
Return the points from the list that lie inside the box.
Definition at line 887 of file vgl_intersection.txx.
| vcl_vector< vgl_point_3d< T > > vgl_intersection | ( | vgl_box_3d< T > const & | b, |
| vcl_vector< vgl_point_3d< T > > const & | p | ||
| ) |
Return the points from the list that lie inside the box.
Definition at line 901 of file vgl_intersection.txx.
| vcl_vector< vgl_point_3d< T > > vgl_intersection | ( | vcl_vector< vgl_point_3d< T > > const & | p, |
| vgl_box_3d< T > const & | b | ||
| ) |
Return the points from the list that lie inside the box.
Definition at line 915 of file vgl_intersection.txx.
1.7.5.1