2 #ifndef vgl_ray_3d_hxx_ 3 #define vgl_ray_3d_hxx_ 11 # include <vcl_msvc_warnings.h> 19 Type len = static_cast<Type>(
length(pcls-p));
32 return s <<
"<vgl_ray_3d: origin" << p.
origin() <<
" dir " << p.
direction() <<
" >";
45 #undef VGL_RAY_3D_INSTANTIATE 46 #define VGL_RAY_3D_INSTANTIATE(Type) \ 47 template class vgl_ray_3d<Type >;\ 48 template std::istream& operator>>(std::istream&, vgl_ray_3d<Type >&);\ 49 template std::ostream& operator<<(std::ostream&, vgl_ray_3d<Type > const&) 51 #endif // vgl_ray_3d_hxx_ T dot_product(v const &a, v const &b)
dot product or inner product of two vectors.
Represents a cartesian 3D point.
std::ostream & operator<<(std::ostream &s, vgl_orient_box_3d< Type > const &p)
Write box to stream.
A 3-d ray defined by an origin and a direction vector.
double length(v const &a)
Return the length of a vector.
Set of closest-point functions.
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.
vgl_point_3d< Type > origin() const
Accessors.
std::istream & operator>>(std::istream &is, vgl_orient_box_3d< Type > &p)
Read box from stream.
void set(vgl_point_3d< Type > const &p0, vgl_vector_3d< Type > const &direction)
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.
vgl_vector_3d< Type > direction() const