2 #ifndef vgl_intersection_hxx_ 3 #define vgl_intersection_hxx_ 14 # include <vcl_msvc_warnings.h> 33 static double eps = 1.0e-8;
61 static_cast<double>(lpt.
y()),
62 static_cast<double>(lpt.
z()));
64 static_cast<double>(di.
y()),
65 static_cast<double>(di.
z()));
74 vymin(0.0, -1.0, 0.0), vymax(0.0, 1.0, 0.0),
75 vzmin(0.0, 0.0, -1.0), vzmax(0.0, 0.0, 1.0);
83 pt_ymin(.0,.0,.0), pt_ymax(.0,.0,.0),
84 pt_zmin(.0,.0,.0), pt_zmax(.0,.0,.0);
95 unsigned int npts = 0;
100 pt_xmin.y()>=ymin && pt_xmin.y()<=ymax &&
101 pt_xmin.z()>=zmin && pt_xmin.z()<=zmax)
108 pt_xmax.y()>=ymin && pt_xmax.y()<=ymax &&
109 pt_xmax.z()>=zmin && pt_xmax.z()<=zmax)
111 if (npts == 0) dp0 = pt_xmax;
117 pt_ymin.x()>=xmin && pt_ymin.x()<=xmax &&
118 pt_ymin.z()>=zmin && pt_ymin.z()<=zmax)
120 if (npts == 0) { dp0 = pt_ymin; ++npts; }
121 else if (npts == 1) { dp1 = pt_ymin; ++npts; }
126 pt_ymax.x()>=xmin && pt_ymax.x()<=xmax &&
127 pt_ymax.z()>=zmin && pt_ymax.z()<=zmax)
129 if (npts == 0) { dp0 = pt_ymax; ++npts; }
130 else if (npts == 1) { dp1 = pt_ymax; ++npts; }
135 pt_zmin.x()>=xmin && pt_zmin.x()<=xmax &&
136 pt_zmin.y()>=ymin && pt_zmin.y()<=ymax)
138 if (npts == 0) { dp0 = pt_zmin; ++npts; }
139 else if (npts == 1) { dp1 = pt_zmin; ++npts; }
145 pt_zmax.
x()>=xmin && pt_zmax.
x()<=xmax &&
146 pt_zmax.
y()>=ymin && pt_zmax.
y()<=ymax)
148 if (npts == 0) { dp0 = pt_zmax; ++npts; }
149 else if (npts == 1) { dp1 = pt_zmax; ++npts; }
154 p0.
set(static_cast<T>(dp0.
x()),
155 static_cast<T>(dp0.
y()),
156 static_cast<T>(dp0.
z()));
157 p1.
set(static_cast<T>(dp1.x()),
158 static_cast<T>(dp1.y()),
159 static_cast<T>(dp1.z()));
179 if (!good_inter)
return false;
189 p1 = p0;
return true;
192 p0 = p1;
return true;
204 std::vector<vgl_point_3d<T> > corners;
216 for (
unsigned int c=0; c<corners.size(); c++) {
218 double d=(plane.
a()*corner.
x());
219 d+=(plane.
b()*corner.
y());
220 d+=(plane.
c()*corner.
z());
227 return neg!=8 && pos!=8;
271 template <
class Type>
277 double a = line.
a(), b = line.
b(), c = line.
c();
285 float y0 = static_cast<float>(-c/b);
289 p0.
set(static_cast<Type>(xmin), static_cast<Type>(ymin));
290 p1.
set(static_cast<Type>(xmax), static_cast<Type>(ymin));
295 p0.
set(static_cast<Type>(xmin), static_cast<Type>(ymax));
296 p1.
set(static_cast<Type>(xmax), static_cast<Type>(ymax));
300 if ((ymin > y0) || (y0 > ymax))
304 p0.
set(static_cast<Type>(xmin), static_cast<Type>(y0));
305 p1.
set(static_cast<Type>(xmax), static_cast<Type>(y0));
312 float x0 = static_cast<float>(-c/a);
316 p0.
set(static_cast<Type>(xmin), static_cast<Type>(ymin));
317 p1.
set(static_cast<Type>(xmin), static_cast<Type>(ymax));
322 p0.
set(static_cast<Type>(xmax), static_cast<Type>(ymin));
323 p1.
set(static_cast<Type>(xmax), static_cast<Type>(ymax));
327 if (xmin <= x0 && x0 <= xmax)
329 p0.
set(static_cast<Type>(x0), static_cast<Type>(ymin));
330 p1.
set(static_cast<Type>(x0), static_cast<Type>(ymax));
340 float y_xmin_int = static_cast<float>(-(c + a*xmin)/b);
341 bool inside_xmin = (y_xmin_int >= ymin) && (y_xmin_int <= ymax);
344 float y_xmax_int = static_cast<float>(-(c + a*xmax)/b);
345 bool inside_xmax = (y_xmax_int >= ymin) && (y_xmax_int <= ymax);
348 float x_ymin_int = static_cast<float>(-(c + b*ymin)/a);
349 bool inside_ymin = (x_ymin_int >= xmin) && (x_ymin_int <= xmax);
352 float x_ymax_int = static_cast<float>(-(c + b*ymax)/a);
353 bool inside_ymax = (x_ymax_int >= xmin) && (x_ymax_int <= xmax);
356 if (inside_xmin && inside_xmax &&
359 p0.
set(static_cast<Type>(xmin), static_cast<Type>(y_xmin_int));
360 p1.
set(static_cast<Type>(xmax), static_cast<Type>(y_xmax_int));
365 if (inside_ymin && inside_ymax &&
368 p0.
set(static_cast<Type>(x_ymin_int), static_cast<Type>(ymin));
369 p1.
set(static_cast<Type>(x_ymax_int), static_cast<Type>(ymax));
374 if (inside_xmin && inside_ymin &&
375 !(inside_xmax && inside_ymax))
377 p0.
set(static_cast<Type>(xmin), static_cast<Type>(y_xmin_int));
378 p1.
set(static_cast<Type>(x_ymin_int), static_cast<Type>(ymin));
383 if (inside_xmin && inside_ymax &&
384 !(inside_xmax && inside_ymin))
386 p0.
set(static_cast<Type>(xmin), static_cast<Type>(y_xmin_int));
387 p1.
set(static_cast<Type>(x_ymax_int), static_cast<Type>(ymax));
392 if (inside_ymin && inside_xmax &&
393 !(inside_xmin && inside_ymax))
395 p0.
set(static_cast<Type>(x_ymin_int), static_cast<Type>(ymin));
396 p1.
set(static_cast<Type>(xmax), static_cast<Type>(y_xmax_int));
401 if (inside_ymax && inside_xmax &&
402 !(inside_xmin && inside_ymin))
404 p0.
set(static_cast<Type>(x_ymax_int), static_cast<Type>(ymax));
405 p1.
set(static_cast<Type>(xmax), static_cast<Type>(y_xmax_int));
409 if (inside_xmin && inside_xmax && inside_ymin && inside_ymax)
413 p0.
set(static_cast<Type>(xmin), static_cast<Type>(ymin));
414 p1.
set(static_cast<Type>(xmax), static_cast<Type>(ymax));
419 p0.
set(static_cast<Type>(xmin), static_cast<Type>(ymax));
420 p1.
set(static_cast<Type>(xmax), static_cast<Type>(ymin));
428 template <
class Type>
437 if (!vgl_intersection<Type>(box, line, pi0, pi1))
439 unsigned int nint = 0;
441 if (vgl_lineseg_test_point<Type>(pi0, line_seg)) {
445 if (vgl_lineseg_test_point<Type>(pi1, line_seg)) {
461 if(p1_in_box&&p2_in_box){
462 int_line_seg = line_seg;
469 if (!vgl_intersection<T>(box, line, pia, pib))
473 bool pia_valid = vgl_lineseg_test_point<T>(pia, line_seg);
474 bool pib_valid = vgl_lineseg_test_point<T>(pib, line_seg);
476 if((!pia_valid)&&(!pib_valid))
480 if(pia_valid&&pib_valid){
481 int_line_seg.
set(pia, pib);
489 int_line_seg.
set(p1, pia);
491 int_line_seg.
set(p1, pib);
495 int_line_seg.
set(p2, pia);
497 int_line_seg.
set(p2, pib);
512 T t1 = (b3-b2)*(a1-a0)-(a3-a2)*(b1-b0), t2 = (b0-b2)*(a1-a0)-(a0-a2)*(b1-b0);
513 if (std::abs(t1) < 0.000001)
515 t1 = (c3-c2)*(a1-a0)-(a3-a2)*(c1-c0), t2 = (c0-c2)*(a1-a0)-(a0-a2)*(c1-c0);
516 if (std::abs(t1) < 0.000001)
517 t1 = (c3-c2)*(b1-b0)-(b3-b2)*(c1-c0), t2 = (c0-c2)*(b1-b0)-(b0-b2)*(c1-c0);
521 ((t1-t2)*b2+t2*b3)/t1,
522 ((t1-t2)*c2+t2*c3)/t1);
605 double denom = plane.
a()*dir.
x() +
611 const T inf = std::numeric_limits<T>::infinity();
622 double numer = - plane.
a()*line.
point1().
x()
647 const double tol = std::numeric_limits<T>::epsilon() * 10e3;
649 double denom = plane.
a()*dir.
x() +
653 if (std::abs(denom) < tol)
660 const T inf = std::numeric_limits<T>::infinity();
661 i_pt.
set(inf,inf,inf);
665 double numer = - plane.
a()*line.
point1().
x()
670 double t = numer/denom;
671 if (t < 0 || t > 1.0)
return false;
673 i_pt = line.
point1() + t * dir;
687 const double tol = std::numeric_limits<T>::epsilon() * 10e3;
689 double denom = plane.
a()*dir.
x() +
693 if (std::abs(denom) < tol)
700 const T inf = std::numeric_limits<T>::infinity();
701 i_pt.
set(inf,inf,inf);
705 double numer = - plane.
a()*pt.
x()
710 double t = numer/denom;
725 const double tol = std::numeric_limits<T>::epsilon() * 10e3;
727 double denom = plane.
a()*dir.
x() +
731 if (std::abs(denom) < tol)
738 const T inf = std::numeric_limits<T>::infinity();
739 i_pt.
set(inf,inf,inf);
743 double numer = - plane.
a()*pt.
x()
748 double t = numer/denom;
749 if (t<0)
return false;
759 T a0, b0, c0, a1, b1, c1;
760 a0 = line0.
a(); b0 = line0.
b(); c0 = line0.
c();
761 a1 = line1.
a(); b1 = line1.
b(); c1 = line1.
c();
763 T delta, delta_x, delta_y, x, y;
764 delta = a0*b1 - a1*b0;
767 delta_x = -c0*b1 + b0*c1; delta_y = -a0*c1 + a1*c0;
768 x = delta_x / delta; y = delta_y / delta;
771 intersection_point.
set( x, y );
784 double n0x = static_cast<double>(plane0.
a());
785 double n0y = static_cast<double>(plane0.
b());
786 double n0z = static_cast<double>(plane0.
c());
787 double n1x = static_cast<double>(plane1.
a());
788 double n1y = static_cast<double>(plane1.
b());
789 double n1z = static_cast<double>(plane1.
c());
798 double tx = std::fabs(static_cast<double>(t.
x_));
799 double ty = std::fabs(static_cast<double>(t.
y_));
800 double tz = std::fabs(static_cast<double>(t.
z_));
802 char component =
'x';
807 double d0 = static_cast<double>(plane0.
d());
808 double d1 = static_cast<double>(plane1.
d());
815 double det = n0y*n1z-n1y*n0z;
818 double neuy = d1*n0z - d0*n1z;
819 double neuz = d0*n1y - d1*n0y;
820 p0d.
set(0.0, neuy/det, neuz/det);
825 double det = n0x*n1z-n1x*n0z;
828 double neux = d1*n0z - d0*n1z;
829 double neuz = d0*n1x - d1*n0x;
830 p0d.set(neux/det, 0.0, neuz/det);
836 double det = n0x*n1y-n1x*n0y;
839 double neux = d1*n0y - d0*n1y;
840 double neuy = d0*n1x - d1*n0x;
841 p0d.set(neux/det, neuy/det, 0.0);
846 static_cast<T>(p0d.y()),
847 static_cast<T>(p0d.z()));
849 static_cast<T>(t.
y()),
850 static_cast<T>(t.
z()));
881 double tol2 = tol*tol;
885 if (uq1 > 0 && uq1 < L2)
888 if (vq1*vq1 <=tol2*L2)
return true;
902 if (uq2 > 0 && uq2 < L2)
905 if (vq2*vq2 <=tol2*L2)
929 if (up1 > 0 && up1 < L2)
932 if (vp1*vp1 <=tol2*L2)
946 if (up2 > 0 && up2 < L2)
949 if (vp2*vp2 <=tol2*L2)
960 return vq1*vq2 < 0 && vp1*vp2 < 0;
971 for (
unsigned int s = 0; s<ns&&!hit; ++s) {
972 unsigned int n = (
unsigned int)(poly[s].size());
973 for (
unsigned int i = 0; i<n&&!hit; ++i) {
978 if (hit)
return true;
984 if (hit)
return true;
986 for (
unsigned int s = 0; s<ns&&!hit; ++s)
988 unsigned int n = (
unsigned int)(poly[s].size());
991 for (
unsigned int i = 1; i<n&&!hit; ++i)
995 hit = vgl_intersection<T>(b,
l, ia, ib)>0;
1001 hit = vgl_intersection<T>(b,ll, ia, ib)>0;
1013 std::vector<vgl_point_2d<T> > r;
1014 typename std::vector<vgl_point_2d<T> >::const_iterator i;
1015 for (i = p.begin(); i != p.end(); ++i)
1027 std::vector<vgl_point_2d<T> > r;
1028 typename std::vector<vgl_point_2d<T> >::const_iterator i;
1029 for (i = p.begin(); i != p.end(); ++i)
1041 std::vector<vgl_point_3d<T> > r;
1042 typename std::vector<vgl_point_3d<T> >::const_iterator i;
1043 for (i = p.begin(); i != p.end(); ++i)
1055 std::vector<vgl_point_3d<T> > r;
1056 typename std::vector<vgl_point_3d<T> >::const_iterator i;
1057 for (i = p.begin(); i != p.end(); ++i)
1066 std::vector<vgl_point_2d<T> > ret;
1068 T a = line.
a(), b = line.
b(), c = line.
c();
1069 T norm = std::sqrt(a*a + b*b);
1070 a/=norm; b/=norm; c/=norm;
1072 for (
unsigned s = 0; s<ns; ++s) {
1073 std::vector<vgl_point_2d<T> > sh = poly[s];
1074 unsigned nv = static_cast<unsigned>(sh.size());
1075 for (
unsigned i = 0; i<nv; ++i) {
1076 unsigned next = (i+1)%nv;
1080 T ad_a = a*pa.
x() +b*pa.
y() +c;
1081 T ad_b = a*pb.
x() +b*pb.
y() +c;
1082 bool sign_a = ad_a>T(0);
1083 bool sign_b = ad_b>T(0);
1084 bool zero = std::abs(ad_a)<tol;
1090 if (!zero&&(sign_a == sign_b))
1103 ret.push_back(p_int);
1114 unsigned npts = ptset.
npts();
1115 for(
unsigned i = 0; i<npts; ++i){
1118 T d = static_cast<T>((p-cp).
length());
1132 unsigned npts = ptset.
npts();
1133 std::vector<vgl_point_3d<T> > pts;
1134 std::vector<vgl_vector_3d<T> > normals;
1136 for(
unsigned i = 0; i<npts; ++i){
1141 normals.push_back(ptset.
n(i));
1150 #undef VGL_INTERSECTION_BOX_INSTANTIATE 1151 #define VGL_INTERSECTION_BOX_INSTANTIATE(T) \ 1152 template vgl_box_2d<T > vgl_intersection(vgl_box_2d<T > const&,vgl_box_2d<T > const&); \ 1153 template vgl_box_3d<T > vgl_intersection(vgl_box_3d<T > const&,vgl_box_3d<T > const&); \ 1154 template std::vector<vgl_point_2d<T > > vgl_intersection(vgl_box_2d<T > const&,std::vector<vgl_point_2d<T > > const&); \ 1155 template std::vector<vgl_point_2d<T > > vgl_intersection(std::vector<vgl_point_2d<T > > const&,vgl_box_2d<T > const&); \ 1156 template std::vector<vgl_point_3d<T > > vgl_intersection(vgl_box_3d<T > const&,std::vector<vgl_point_3d<T > > const&); \ 1157 template std::vector<vgl_point_3d<T > > vgl_intersection(std::vector<vgl_point_3d<T > > const&,vgl_box_3d<T > const&); \ 1158 template bool vgl_intersection(vgl_box_2d<T > const&,vgl_line_2d<T > const&,vgl_point_2d<T >&,vgl_point_2d<T >&); \ 1159 template bool vgl_intersection(vgl_box_2d<T> const&,vgl_line_segment_2d<T> const&, vgl_line_segment_2d<T>& ); \ 1160 template bool vgl_intersection(vgl_box_3d<T > const&,vgl_plane_3d<T > const&); \ 1161 template bool vgl_intersection(vgl_box_3d<T > const&,vgl_infinite_line_3d<T > const&,vgl_point_3d<T >&,vgl_point_3d<T >&);\ 1162 template bool vgl_intersection(vgl_box_3d<T > const&,vgl_ray_3d<T > const&,vgl_point_3d<T >&,vgl_point_3d<T >&) 1163 #undef VGL_INTERSECTION_INSTANTIATE 1164 #define VGL_INTERSECTION_INSTANTIATE(T) \ 1165 template vgl_pointset_3d<T> vgl_intersection(vgl_plane_3d<T> const&, vgl_pointset_3d<T> const&, T); \ 1166 template vgl_pointset_3d<T> vgl_intersection(vgl_box_3d<T> const&, vgl_pointset_3d<T> const&); \ 1167 template vgl_point_3d<T > vgl_intersection(vgl_line_3d_2_points<T > const&,vgl_line_3d_2_points<T > const&); \ 1168 template bool vgl_intersection(vgl_line_segment_3d<T > const&,vgl_line_segment_3d<T > const&,vgl_point_3d<T >&); \ 1169 template bool vgl_intersection(vgl_line_3d_2_points<T > const&,vgl_line_segment_3d<T > const&,vgl_point_3d<T >&); \ 1170 template bool vgl_intersection(vgl_ray_3d<T > const&,vgl_ray_3d<T > const&,vgl_point_3d<T >&); \ 1171 template vgl_point_3d<T > vgl_intersection(vgl_line_3d_2_points<T > const&,vgl_plane_3d<T > const&); \ 1172 template bool vgl_intersection(vgl_line_segment_3d<T > const&,vgl_plane_3d<T > const&,vgl_point_3d<T >&); \ 1173 template bool vgl_intersection(vgl_infinite_line_3d<T > const&,vgl_plane_3d<T > const&,vgl_point_3d<T >&); \ 1174 template bool vgl_intersection(vgl_ray_3d<T > const& ray, vgl_plane_3d<T > const& plane, vgl_point_3d<T > & i_pt); \ 1175 template bool vgl_intersection(vgl_infinite_line_3d<T > const&,vgl_infinite_line_3d<T > const&,vgl_point_3d<T >&); \ 1176 template vgl_point_3d<T > vgl_intersection(vgl_plane_3d<T > const&,vgl_plane_3d<T > const&,vgl_plane_3d<T > const&); \ 1177 template unsigned vgl_intersection(vgl_box_2d<T > const&,vgl_line_segment_2d<T > const&,vgl_point_2d<T >&,vgl_point_2d<T >&); \ 1178 template bool vgl_intersection(vgl_line_2d<T > const&,vgl_line_2d<T > const&,vgl_point_2d<T >&); \ 1179 template bool vgl_intersection(vgl_point_2d<T > const&,vgl_point_2d<T > const&,vgl_point_2d<T > const&,vgl_point_2d<T > const&,double); \ 1180 template bool vgl_intersection(vgl_box_2d<T > const&,vgl_polygon<T > const&); \ 1181 template bool vgl_intersection(vgl_plane_3d<T > const&,vgl_plane_3d<T > const&,vgl_line_segment_3d<T > &); \ 1182 template bool vgl_intersection(vgl_plane_3d<T > const&,vgl_plane_3d<T > const&,vgl_infinite_line_3d<T >&); \ 1183 template std::vector<vgl_point_2d<T > > vgl_intersection(vgl_polygon<T > const&, vgl_line_2d<T > const&); \ 1184 VGL_INTERSECTION_BOX_INSTANTIATE(T) 1186 #endif // vgl_intersection_hxx_ Set of intersection functions.
Represents a 2D line segment using two points.
T dot_product(v const &a, v const &b)
dot product or inner product of two vectors.
Type b() const
Parameter b of line a*x + b*y + c = 0.
bool vgl_near_eq(double x, double y)
vgl_point_3d< Type > point1() const
a point in 2D nonhomogeneous space
Type a() const
Parameter a of line a*x + b*y + c = 0.
bool contains(point_t const &p) const
Returns true if p(x,y) is inside the polygon, else false.
Type min_x() const
Get min x.
vgl_point_3d< Type > p(unsigned i) const
Direction vector in Euclidean 2D space, templated by type of element.
void add_point_with_normal(vgl_point_3d< Type > const &p, vgl_vector_3d< Type > const &normal)
incrementally grow points and normals duplicate pairs are allowed.
vgl_vector_3d< Type > direction() const
T a() const
Return x coefficient.
vgl_point_3d< Type > point2() const
Type min_z() const
Get min z.
direction vector in Euclidean 3D space
Contains class to represent a cartesian 3D bounding box.
Type c() const
Parameter c of line a*x + b*y + c = 0.
bool concurrent(l const &l1, l const &l2, l const &l3)
Are three lines concurrent, i.e., do they pass through a common point?.
bool contains(const vgl_point_3d< Type > &p) const
Check if point p is on the line.
vgl_point_2d< Type > point2() const
The other end-point of the line segment.
vgl_vector_3d< Type > direction() const
Return the direction vector of this line (not normalised - but perhaps it should be,...
A 3-d ray defined by an origin and a direction vector.
Type max_z() const
Get max z.
bool contains(vgl_point_2d< Type > const &p) const
Return true iff the point p is inside this box.
vgl_point_3d< T > vgl_intersection(const std::vector< vgl_plane_3d< T > > &p)
Return the intersection point of vector of planes.
double length(v const &a)
Return the length of a vector.
A class to hold a non-homogeneous representation of a 3D line.
Type max_y() const
Get max y.
Set of closest-point functions.
T b() const
Return y coefficient.
vgl_point_3d< Type > min_point() const
Return lower left corner of box.
Type min_x() const
Get min x.
line segment in 3D nonhomogeneous space
vgl_point_2d< T > vgl_closest_point(vgl_line_2d< T > const &l, vgl_point_2d< T > const &p)
Return the point on the given line closest to the given point.
double length() const
Return the length of this vector.
void set(Type px, Type py)
Set x and y.
T cross_product(v const &a, v const &b)
cross product of two vectors (area of enclosed parallellogram).
bool has_normals() const
accessors.
Represents a Euclidean 2D line.
vgl_point_3d< Type > point_t(const double t) const
Return a point on the line defined by a scalar parameter t.
vgl_point_3d< Type > point1() const
Return the first point representing this line.
Represents a Euclidean 3D plane.
Represents a 3D line segment using two points.
Type a() const
Parameter a of line a*x + b*y + c = 0.
void add_point(vgl_point_3d< Type > const &p)
incrementally grow points, duplicate points are allowed.
T d() const
Return constant coefficient.
Contains class to represent a cartesian 2D bounding box.
vgl_point_3d< Type > origin() const
Accessors.
Represents a 3-d line with position defined in the orthogonal plane passing through the origin.
Direction vector in Euclidean 3D space, templated by type of element.
Type height() const
Get height of this box (= y dimension).
bool contains(vgl_point_3d< Type > const &p) const
Return true iff the point p is inside this box.
vgl_point_3d< Type > max_point() const
Return upper right corner of box.
Type b() const
Parameter b of line a*x + b*y + c = 0.
T sqr_length(v const &a)
Return the squared length of a vector.
double vgl_distance(vgl_point_2d< T >const &p1, vgl_point_2d< T >const &p2)
return the distance between two points.
Type min_y() const
Get min y.
vgl_point_3d< Type > point2() const
Return the second point representing this line.
Represents a cartesian 2D point.
void set(Type px, Type py, Type pz)
Set x, y and z.
Type min_y() const
Get min y.
Type c() const
Parameter c of line a*x + b*y + c = 0.
void set(vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2)
Assignment.
bool contains(const vgl_point_3d< Type > &p) const
Check if point p is on the ray and lies in the positive ray direction.
a plane in 3D nonhomogeneous space
non-homogeneous 3D line, represented by 2 points.
Type width() const
Get width of this box (= x dimension).
Represents a cartesian 3D box.
Type max_y() const
Get max y.
vgl_vector_3d< Type > direction() const
Return the direction vector of this line (not normalised - but perhaps it should be,...
Set of distance functions.
unsigned int num_sheets() const
vgl_point_3d< Type > point() const
Return the point on the line closest to the origin.
bool vgl_near_zero(double x)
Type max_x() const
Get max x.
vgl_point_2d< Type > point1() const
One end-point of the line segment.
vgl_vector_3d< Type > direction() const
T c() const
Return z coefficient.
vgl_vector_3d< Type > n(unsigned i) const
Type max_x() const
Get max x.