ContRap-Libraries
Public Member Functions | Protected Attributes

crp::Ray2D Class Reference

Class Line2D is a ray unbounded in both directions. More...

#include <primitives.h>

Inheritance diagram for crp::Ray2D:
crp::Primitive2D

Public Member Functions

 Ray2D (double a=0.0, double b=0.0, double c=0.0)
 Creates a new line from homogeneos coordinates.
virtual ~Ray2D ()
 Destructor.
 Ray2D (const Ray2D &primitive)
 Copy constructor.
Ray2Doperator= (const Ray2D &primitive)
 Assignment operator.
void set_coordinates (double a, double b, double c)
 Sets the coordinates.
virtual Type get_type () const
 Type of the primitive.
double get_dist () const
 Returns the distance to the origin of the nearest point.
virtual Primitive2Dget_copy ()
 Copies the current primitive.

Protected Attributes

double c
 Displacement of the ray from the origin.

Detailed Description

Class Line2D is a ray unbounded in both directions.


Constructor & Destructor Documentation

crp::Ray2D::Ray2D ( double  a = 0.0,
double  b = 0.0,
double  c = 0.0 
) [inline]

Creates a new line from homogeneos coordinates.

Parameters:
aHomogeneous coordinate
bHomogeneous coordinate
cHomogeneous coordinate
virtual crp::Ray2D::~Ray2D ( ) [inline, virtual]

Destructor.

crp::Ray2D::Ray2D ( const Ray2D primitive) [inline]

Copy constructor.

Parameters:
primitivePrimitive to copy

Member Function Documentation

virtual Primitive2D* crp::Ray2D::get_copy ( ) [inline, virtual]

Copies the current primitive.

Returns:
New copy of the current primitive

Implements crp::Primitive2D.

double crp::Ray2D::get_dist ( ) const [inline]

Returns the distance to the origin of the nearest point.

Returns:
Distance to the origin
virtual Type crp::Ray2D::get_type ( ) const [inline, virtual]

Type of the primitive.

Returns:
Type of the primitive

Implements crp::Primitive2D.

Ray2D& crp::Ray2D::operator= ( const Ray2D primitive) [inline]

Assignment operator.

Parameters:
primitiveObject to assign
void crp::Ray2D::set_coordinates ( double  a,
double  b,
double  c 
) [inline]

Sets the coordinates.

Parameters:
aHomogeneous coordinate
bHomogeneous coordinate
cHomogeneous coordinate

Field Documentation

double crp::Ray2D::c [protected]

Displacement of the ray from the origin.


The documentation for this class was generated from the following file: