2 #ifndef vgl_line_3d_2_points_h_ 3 #define vgl_line_3d_2_points_h_ 17 # include <vcl_msvc_warnings.h> 71 inline bool ideal(Type = (Type)0)
const {
return false; }
81 #define l vgl_line_3d_2_points<Type> 86 inline bool is_ideal(
l const&, Type=(Type)0) {
return false; }
94 return collinear(l1.point1(),l1.point2(),p);
101 {
return coplanar(l1.point1(),l1.point2(),l2.point1(),l2.point2()); }
105 template <
class Type>
114 template <
class Type>
116 {
return coplanar(l1.point1(),l1.point2(),p1,p2); }
120 template <
class Type>
134 template <
class Type>
142 template <
class Type>
149 template <
class Type>
162 template <
class Type>
163 std::ostream &
operator<<(std::ostream&s,
l const& );
167 template <
class Type>
172 #define VGL_LINE_3D_2_POINTS_INSTANTIATE(T) extern "please include vgl/vgl_line_3d_2_points.hxx first" 174 #endif // vgl_line_3d_2_points_h_ vgl_line_3d_2_points(const vgl_line_3d_2_points< Type > &that)
Copy constructor.
void set(vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2)
Assignment.
vgl_point_3d< Type > point_t(const double t) const
Return a point on the line defined by a scalar parameter t such that t=0.0 at point1 and t=1....
bool operator!=(vgl_line_3d_2_points< Type > const &l) const
vgl_line_3d_2_points(void)
Default constructor with (0,0,0) and (1,0,0), which is the line y=z=0.
direction vector in Euclidean 3D space
Represents a cartesian 3D point.
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 ideal(Type=(Type) 0) const
Return true iff line is at infinity (which is always false).
bool operator==(vgl_line_3d_2_points< Type > const &l) const
comparison.
vgl_vector_3d< Type > direction() const
Return the direction vector of this line (not normalised - but perhaps it should be,...
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
vgl_point_3d< T > vgl_intersection(const std::vector< vgl_plane_3d< T > > &p)
Return the intersection point of vector of planes.
A class to hold a non-homogeneous representation of a 3D line.
vgl_point_3d< Type > point2_
Any other point on the line.
bool collinear(l const &l1, vgl_homg_point_3d< Type > const &p)
Does a line pass through a point, i.e., are the point and the line collinear?.
a point in 3D nonhomogeneous space
vgl_point_3d< Type > point1() const
Return the first point representing this line.
Represents a Euclidean 3D plane.
bool is_ideal(l const &line, T tol=(T) 0)
Return true iff line is the line at infinity.
bool coplanar(l const &l1, l const &l2)
Are two lines coplanar, i.e., do they intersect?.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
vgl_homg_point_3d< Type > intersection(l const &l1, l const &l2)
Return the intersection point of two concurrent lines.
vgl_point_3d< Type > point2() const
Return the second point representing this line.
vgl_line_3d_2_points(vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2)
Construct from two points.
bool parallel(v const &a, v const &b, double eps=0.0)
are two vectors parallel, i.e., is one a scalar multiple of the other?.
vgl_point_3d< Type > point1_
Any point on the line.