\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.7 - 2D and 3D Linear Geometry Kernel
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Ray_3< Kernel > Class Template Reference

#include <CGAL/Ray_3.h>

Definition

An object r of the data type Ray_3 is a directed straight ray in the three-dimensional Euclidean space \( \E^3\).

It starts in a point called the source of r and it goes to infinity.

See also
Kernel::Ray_3

Creation

 Ray_3 (const Point_3< Kernel > &p, const Point_3< Kernel > &q)
 introduces a ray r with source p and passing through point q. More...
 
 Ray_3 (const Point_3< Kernel > &p, const Direction_3< Kernel > &d)
 introduces a ray r with source p and with direction d. More...
 
 Ray_3 (const Point_3< Kernel > &p, const Vector_3< Kernel > &v)
 introduces a ray r with source p and with a direction given by v. More...
 
 Ray_3 (const Point_3< Kernel > &p, const Line_3< Kernel > &l)
 introduces a ray r starting at source p with the same direction as l. More...
 

Operations

bool operator== (const Ray_3< Kernel > &h) const
 Test for equality: two rays are equal, iff they have the same source and the same direction. More...
 
bool operator!= (const Ray_3< Kernel > &h) const
 Test for inequality. More...
 
Point_3< Kernelsource () const
 returns the source of r More...
 
Point_3< Kernelpoint (int i) const
 returns a point on r. More...
 
Direction_3< Kerneldirection () const
 returns the direction of r. More...
 
Vector_3< Kernelto_vector () const
 returns a vector giving the direction of r. More...
 
Line_3< Kernelsupporting_line () const
 returns the line supporting r which has the same direction. More...
 
Ray_3< Kernelopposite () const
 returns the ray with the same source and the opposite direction. More...
 
bool is_degenerate () const
 ray r is degenerate, if the source and the second defining point fall together (that is if the direction is degenerate). More...
 
bool has_on (const Point_3< Kernel > &p) const
 A point is on r, iff it is equal to the source of r, or if it is in the interior of r. More...
 
Ray_3< Kerneltransform (const Aff_transformation_3< Kernel > &t) const
 returns the ray obtained by applying t on the source and on the direction of r. More...
 

Constructor & Destructor Documentation

template<typename Kernel >
CGAL::Ray_3< Kernel >::Ray_3 ( const Point_3< Kernel > &  p,
const Point_3< Kernel > &  q 
)

introduces a ray r with source p and passing through point q.

template<typename Kernel >
CGAL::Ray_3< Kernel >::Ray_3 ( const Point_3< Kernel > &  p,
const Direction_3< Kernel > &  d 
)

introduces a ray r with source p and with direction d.

template<typename Kernel >
CGAL::Ray_3< Kernel >::Ray_3 ( const Point_3< Kernel > &  p,
const Vector_3< Kernel > &  v 
)

introduces a ray r with source p and with a direction given by v.

template<typename Kernel >
CGAL::Ray_3< Kernel >::Ray_3 ( const Point_3< Kernel > &  p,
const Line_3< Kernel > &  l 
)

introduces a ray r starting at source p with the same direction as l.

Member Function Documentation

template<typename Kernel >
Direction_3<Kernel> CGAL::Ray_3< Kernel >::direction ( ) const

returns the direction of r.

template<typename Kernel >
bool CGAL::Ray_3< Kernel >::has_on ( const Point_3< Kernel > &  p) const

A point is on r, iff it is equal to the source of r, or if it is in the interior of r.

template<typename Kernel >
bool CGAL::Ray_3< Kernel >::is_degenerate ( ) const

ray r is degenerate, if the source and the second defining point fall together (that is if the direction is degenerate).

template<typename Kernel >
bool CGAL::Ray_3< Kernel >::operator!= ( const Ray_3< Kernel > &  h) const

Test for inequality.

template<typename Kernel >
bool CGAL::Ray_3< Kernel >::operator== ( const Ray_3< Kernel > &  h) const

Test for equality: two rays are equal, iff they have the same source and the same direction.

template<typename Kernel >
Ray_3<Kernel> CGAL::Ray_3< Kernel >::opposite ( ) const

returns the ray with the same source and the opposite direction.

template<typename Kernel >
Point_3<Kernel> CGAL::Ray_3< Kernel >::point ( int  i) const

returns a point on r.

point(0) is the source. point(i), with i>0, is different from the source.

Precondition
\( i \geq0\).
template<typename Kernel >
Point_3<Kernel> CGAL::Ray_3< Kernel >::source ( ) const

returns the source of r

template<typename Kernel >
Line_3<Kernel> CGAL::Ray_3< Kernel >::supporting_line ( ) const

returns the line supporting r which has the same direction.

template<typename Kernel >
Vector_3<Kernel> CGAL::Ray_3< Kernel >::to_vector ( ) const

returns a vector giving the direction of r.

template<typename Kernel >
Ray_3<Kernel> CGAL::Ray_3< Kernel >::transform ( const Aff_transformation_3< Kernel > &  t) const

returns the ray obtained by applying t on the source and on the direction of r.