Navigation: Up, Table of Contents, Bibliography, Index, Title Page

3D Ray (CGAL_Ray_3)

Definition

An object r of the data type CGAL_Ray_3 is a directed straight ray in the three-dimensional Euclidean space E3. It starts in a point called the source of r and it goes to infinity.

#include <CGAL/Ray_3.h>

Creation

CGAL_Ray_3<R> r ( CGAL_Point_3<R> p, Point_3 q);
introduces a ray r with source p and passing through point q.

CGAL_Ray_3<R> r ( CGAL_Point_3<R> p, CGAL_Direction_3<R> d);
introduces a ray r with source p and with direction d.

Operations

bool r == h Test for equality: two rays are equal, iff they have the same source and the same direction.
bool r != h Test for inequality.
CGAL_Point_3<R> r.source () returns the source of r
CGAL_Point_3<R> r.point ( int i) returns a point on r. point(0) is the source. point(i), with i>0, is different from the source.
Precondition: i >=0.
CGAL_Direction_3<R>
r.direction () returns the direction of r.
CGAL_Line_3<R> r.supporting_line ()
returns the line supporting r which has the same direction.
CGAL_Ray_3<R> r.opposite () returns the ray with the same source and the opposite direction.
bool r.is_degenerate () ray r is degenerate, if the source and the second defining point fall together (that is if the direction is degenerate).
bool r.has_on ( CGAL_Point_3<R> p)
A point is on r, iff it is equal to the source of r, or if it is in the interior of r.
CGAL_Ray_3<R> r.transform ( CGAL_Aff_transformation_3<R> t)
returns the ray obtained by applying t on the source and on the direction of r.


Next: Class declaration of CGAL_Segment_3<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. Wed, January 20, 1999.