Represents a 3-d ray. More...
#include <vgl_fwd.h>
Public Member Functions | |
| vgl_ray_3d ()=default | |
| Default constructor - does not initialise!. More... | |
| vgl_ray_3d (vgl_ray_3d< Type > const &l) | |
| Copy constructor. More... | |
| vgl_ray_3d (vgl_point_3d< Type > const &p0, vgl_vector_3d< Type > const &direction) | |
| Construct from orign and direction. More... | |
| vgl_ray_3d (vgl_point_3d< Type > const &origin, vgl_point_3d< Type > const &p) | |
| Construct from two points. More... | |
| vgl_ray_3d (vgl_line_segment_3d< Type > const &ls) | |
| Construct from a line segment, direction from 1 to 2. More... | |
| vgl_ray_3d (vgl_line_3d_2_points< Type > const &ls) | |
| Construct from a line 2 points direction from 1 to 2. More... | |
| ~vgl_ray_3d ()=default | |
| Destructor. More... | |
| vgl_point_3d< Type > | origin () const |
| Accessors. More... | |
| vgl_vector_3d< Type > | direction () const |
| bool | operator== (vgl_ray_3d< Type > const &r) const |
| The comparison operator. More... | |
| bool | operator!= (vgl_ray_3d< Type >const &other) const |
| void | set (vgl_point_3d< Type > const &p0, vgl_vector_3d< Type > const &direction) |
| Assignment. More... | |
| bool | contains (const vgl_point_3d< Type > &p) const |
| Check if point p is on the ray and lies in the positive ray direction. More... | |
Private Attributes | |
| vgl_point_3d< Type > | p0_ |
| The ray origin. More... | |
| vgl_vector_3d< Type > | t_ |
| ray direction vector More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class T > | |
| bool | vgl_intersection (vgl_ray_3d< T > const &r1, vgl_ray_3d< T > const &r2, vgl_point_3d< T > &i_pnt) |
| Return the intersection point of rays. Returns false if rays are parallel or intersect outside of positive ray domain. More... | |
| template<class T > | |
| bool | vgl_intersection (vgl_box_3d< T > const &box, vgl_ray_3d< T > const &ray, vgl_point_3d< T > &p0, vgl_point_3d< T > &p1) |
| Return true if ray intersects box. If so, compute intersection points. More... | |
| template<class Type > | |
| std::ostream & | operator<< (std::ostream &s, const vgl_ray_3d< Type > &p) |
| Write to stream. More... | |
| template<class Type > | |
| std::istream & | operator>> (std::istream &is, vgl_ray_3d< Type > &p) |
| Read from stream. More... | |
Represents a 3-d ray.
The ray origin is p0 and the direction is t_.
|
inlinedefault |
Default constructor - does not initialise!.
|
inline |
Copy constructor.
Definition at line 36 of file vgl_ray_3d.h.
|
inline |
Construct from orign and direction.
Definition at line 40 of file vgl_ray_3d.h.
|
inline |
Construct from two points.
Definition at line 45 of file vgl_ray_3d.h.
|
inline |
Construct from a line segment, direction from 1 to 2.
Definition at line 49 of file vgl_ray_3d.h.
|
inline |
Construct from a line 2 points direction from 1 to 2.
Definition at line 56 of file vgl_ray_3d.h.
|
inlinedefault |
Destructor.
| bool vgl_ray_3d< Type >::contains | ( | const vgl_point_3d< Type > & | p | ) | const |
Check if point p is on the ray and lies in the positive ray direction.
Definition at line 16 of file vgl_ray_3d.hxx.
|
inline |
Definition at line 68 of file vgl_ray_3d.h.
|
inline |
Definition at line 75 of file vgl_ray_3d.h.
|
inline |
The comparison operator.
Definition at line 72 of file vgl_ray_3d.h.
|
inline |
Accessors.
Definition at line 66 of file vgl_ray_3d.h.
|
inline |
Assignment.
Definition at line 79 of file vgl_ray_3d.h.
|
related |
Write to stream.
|
related |
Read from stream.
|
related |
Return the intersection point of rays. Returns false if rays are parallel or intersect outside of positive ray domain.
|
related |
Return true if ray intersects box. If so, compute intersection points.
If ray origin is inside box then p0==p1
Definition at line 171 of file vgl_intersection.hxx.
|
private |
The ray origin.
Definition at line 29 of file vgl_ray_3d.h.
|
private |
ray direction vector
Definition at line 30 of file vgl_ray_3d.h.
1.8.15