2 #ifndef vgl_line_segment_3d_h_ 3 #define vgl_line_segment_3d_h_ 18 # include <vcl_msvc_warnings.h> 72 return r < 1e-8 && r > -1e-8;
85 #define VGL_LINE_SEGMENT_3D_INSTANTIATE(T) extern "please include vgl/vgl_line_segment_3d.hxx first" 87 #endif // vgl_line_segment_3d_h_ ~vgl_line_segment_3d()=default
vgl_line_segment_3d(vgl_line_segment_3d< Type > const &l)
Copy constructor.
vgl_point_3d< Type > point1() const
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.
vgl_point_3d< Type > point2() const
Represents a cartesian 3D point.
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
vgl_point_3d< Type > point1_
a point in 3D nonhomogeneous space
bool contains(const vgl_point_3d< Type > &p) const
Check if point p is on the line segment.
Represents a 3D line segment using two points.
vgl_line_segment_3d()=default
Default constructor - does not initialise!.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
bool operator!=(vgl_line_segment_3d< Type >const &other) const
bool operator==(vgl_line_segment_3d< Type > const &l) const
the comparison operator.
vgl_vector_3d< Type > direction() const
Return the direction vector of this line (not normalised - but perhaps it should be,...
double length(v const &a)
Return the length of a vector.
vgl_point_3d< Type > point2_
vgl_line_segment_3d(vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2)
Construct from two end points.