Public Member Functions | Public Attributes | Private Attributes | List of all members
ecl::LinearSegment Class Reference

#include <linear_segment.hpp>

Public Member Functions

 LinearSegment (const double &x_1, const double &y_1, const double &x_2, const double &y_2)
 
double squaredDistanceFromPoint (const double &x, const double &y) const
 Distance of a point from the segment. More...
 

Public Attributes

ecl::Parameter< double > A
 
ecl::Parameter< double > B
 
ecl::Parameter< double > C
 

Private Attributes

double x_1
 
double x_2
 
double y_1
 
double y_2
 

Detailed Description

Definition at line 33 of file linear_segment.hpp.

Constructor & Destructor Documentation

◆ LinearSegment()

ecl::LinearSegment::LinearSegment ( const double &  x_1,
const double &  y_1,
const double &  x_2,
const double &  y_2 
)

Definition at line 24 of file lib/linear_segment.cpp.

Member Function Documentation

◆ squaredDistanceFromPoint()

double ecl::LinearSegment::squaredDistanceFromPoint ( const double &  x,
const double &  y 
) const

Distance of a point from the segment.

Returns the distance from one of the end points if it is closer than the segment itself.

TODO shift this to a standard geometry function computing the squared distance between two geometric objects.

Parameters
x: x coordinate of the point
y: y-coordinate of the point
Returns
double

Definition at line 40 of file lib/linear_segment.cpp.

Member Data Documentation

◆ A

ecl::Parameter<double> ecl::LinearSegment::A

Definition at line 63 of file linear_segment.hpp.

◆ B

ecl::Parameter<double> ecl::LinearSegment::B

Definition at line 63 of file linear_segment.hpp.

◆ C

ecl::Parameter<double> ecl::LinearSegment::C

Definition at line 63 of file linear_segment.hpp.

◆ x_1

double ecl::LinearSegment::x_1
private

Definition at line 66 of file linear_segment.hpp.

◆ x_2

double ecl::LinearSegment::x_2
private

Definition at line 67 of file linear_segment.hpp.

◆ y_1

double ecl::LinearSegment::y_1
private

Definition at line 66 of file linear_segment.hpp.

◆ y_2

double ecl::LinearSegment::y_2
private

Definition at line 67 of file linear_segment.hpp.


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


ecl_geometry
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:40