Class Line2D is a ray unbounded in both directions.
More...
#include <primitives.h>
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.
|
Ray2D & | operator= (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 Primitive2D * | get_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:
-
a | Homogeneous coordinate |
b | Homogeneous coordinate |
c | Homogeneous coordinate |
virtual crp::Ray2D::~Ray2D |
( |
| ) |
[inline, virtual] |
crp::Ray2D::Ray2D |
( |
const Ray2D & |
primitive | ) |
[inline] |
Copy constructor.
- Parameters:
-
primitive | Primitive 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:
-
void crp::Ray2D::set_coordinates |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c |
|
) |
| [inline] |
Sets the coordinates.
- Parameters:
-
a | Homogeneous coordinate |
b | Homogeneous coordinate |
c | Homogeneous coordinate |
Field Documentation
Displacement of the ray from the origin.
The documentation for this class was generated from the following file: