#include <vifa_imp_line.h>
Public Member Functions | |
vifa_imp_line (void) | |
Default constructor - does not initialize. | |
vifa_imp_line (vifa_imp_line const &l) | |
vifa_imp_line (vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2) | |
Line segment constructor. | |
vifa_imp_line (vgl_vector_2d< Type > d, vgl_point_2d< Type > m) | |
Direction/midpoint constructor. | |
vifa_imp_line (Type a, Type b, Type c) | |
Implicit coefficient constructor. | |
bool | near_zero (double x) const |
Test if a value is near 0.0. | |
double | get_dir_x (void) |
Compute unit projection along X-axis. | |
double | get_dir_y (void) |
Compute unit projection along Y-axis. | |
double | length (void) |
Compute length of line segment. | |
void | set_points (vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2) |
Assignment. | |
void | project_2d_pt (const Type &p, const Type &q, Type &x, Type &y) const |
Project a 2D point onto the line. | |
vgl_point_2d< Type > | project_2d_pt (const vgl_point_2d< Type > &t) const |
double | find_t (const vgl_point_2d< Type > &p) |
Find parametric t-value for a given point relative to line segment. | |
vgl_point_2d< Type > | find_at_t (double t) |
Find point on line (defined by line segment) for a parametric t-value. | |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
vgl_point_2d< Type > | point1 () const |
vgl_point_2d< Type > | point2 () const |
bool | operator== (vgl_line_segment_2d< Type > const &l) const |
bool | operator!= (vgl_line_segment_2d< Type >const &other) const |
Type | a () const |
Type | b () const |
Type | c () const |
vgl_vector_2d< Type > | direction () const |
vgl_vector_2d< Type > | normal () const |
double | slope_radians () const |
double | slope_degrees () const |
void | set (vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2) |
vgl_point_2d< Type > | point_t (const double t) const |
vgl_point_2d< T > | vgl_closest_point (vgl_line_segment_2d< T > const &l, vgl_point_2d< T > const &p) |
double | vgl_distance (vgl_line_segment_2d< T > const &l, vgl_point_2d< T > const &p) |
unsigned | vgl_intersection (vgl_box_2d< T > const &box, vgl_line_segment_2d< T > const &line, vgl_point_2d< T > &p0, vgl_point_2d< T > &p1) |
vcl_ostream & | operator<< (vcl_ostream &s, const vgl_line_segment_2d< Type > &p) |
vcl_istream & | operator>> (vcl_istream &is, vgl_line_segment_2d< Type > &p) |
bool | vgl_lineseg_test_line (vgl_line_2d< T > const &l1, vgl_line_segment_2d< T > const &l2) |
export bool | vgl_lineseg_test_point (vgl_point_2d< T > const &p, vgl_line_segment_2d< T > const &lseg) |
bool | vgl_lineseg_test_lineseg (vgl_line_segment_2d< T > const &l1, vgl_line_segment_2d< T > const &l2) |
Protected Attributes | |
double | dx_ |
X-axis span of line segment. | |
double | dy_ |
Y-axis span of line segment. |
Definition at line 23 of file vifa_imp_line.h.
vifa_imp_line< Type >::vifa_imp_line | ( | void | ) | [inline] |
Default constructor - does not initialize.
Definition at line 34 of file vifa_imp_line.h.
vifa_imp_line< Type >::vifa_imp_line | ( | vifa_imp_line< Type > const & | l | ) | [inline] |
Definition at line 37 of file vifa_imp_line.h.
vifa_imp_line< Type >::vifa_imp_line | ( | vgl_point_2d< Type > const & | p1, |
vgl_point_2d< Type > const & | p2 | ||
) |
Line segment constructor.
Definition at line 15 of file vifa_imp_line.txx.
vifa_imp_line< Type >::vifa_imp_line | ( | vgl_vector_2d< Type > | d, |
vgl_point_2d< Type > | m | ||
) |
Direction/midpoint constructor.
Definition at line 24 of file vifa_imp_line.txx.
vifa_imp_line< Type >::vifa_imp_line | ( | Type | a, |
Type | b, | ||
Type | c | ||
) |
Implicit coefficient constructor.
Definition at line 36 of file vifa_imp_line.txx.
vgl_point_2d< Type > vifa_imp_line< Type >::find_at_t | ( | double | t | ) |
Find point on line (defined by line segment) for a parametric t-value.
Definition at line 164 of file vifa_imp_line.txx.
double vifa_imp_line< Type >::find_t | ( | const vgl_point_2d< Type > & | p | ) |
Find parametric t-value for a given point relative to line segment.
Definition at line 144 of file vifa_imp_line.txx.
double vifa_imp_line< Type >::get_dir_x | ( | void | ) |
Compute unit projection along X-axis.
Definition at line 55 of file vifa_imp_line.txx.
double vifa_imp_line< Type >::get_dir_y | ( | void | ) |
Compute unit projection along Y-axis.
Definition at line 76 of file vifa_imp_line.txx.
double vifa_imp_line< Type >::length | ( | void | ) |
Compute length of line segment.
Definition at line 67 of file vifa_imp_line.txx.
bool vifa_imp_line< Type >::near_zero | ( | double | x | ) | const [inline] |
Test if a value is near 0.0.
Definition at line 52 of file vifa_imp_line.h.
void vifa_imp_line< Type >::project_2d_pt | ( | const Type & | p, |
const Type & | q, | ||
Type & | x, | ||
Type & | y | ||
) | const |
Project a 2D point onto the line.
Definition at line 100 of file vifa_imp_line.txx.
vgl_point_2d< Type > vifa_imp_line< Type >::project_2d_pt | ( | const vgl_point_2d< Type > & | t | ) | const |
Definition at line 129 of file vifa_imp_line.txx.
void vifa_imp_line< Type >::set_points | ( | vgl_point_2d< Type > const & | p1, |
vgl_point_2d< Type > const & | p2 | ||
) |
Assignment.
Definition at line 87 of file vifa_imp_line.txx.
double vifa_imp_line< Type >::dx_ [protected] |
X-axis span of line segment.
Definition at line 27 of file vifa_imp_line.h.
double vifa_imp_line< Type >::dy_ [protected] |
Y-axis span of line segment.
Definition at line 30 of file vifa_imp_line.h.