#include <point.H>
Inherits Geom_Object.
Public Types | |
| enum | Sense { E, NE, N, NW, W, S, SW, SE } |
Public Member Functions | |
| bool | operator== (const Segment &s) const |
| bool | operator!= (const Segment &s) const |
| const Point & | highest_point () const |
| const Point & | lowest_point () const |
| const Point & | leftmost_point () const |
| const Point & | rightmost_point () const |
| const Point & | get_src_point () const |
| const Point & | get_tgt_point () const |
| Segment (const Segment &s) | |
| Segment (const Point &__src, const Point &__tgt) | |
| Segment (const Point &__src, const Geom_Number &m, const Geom_Number &l) | |
| Segment (const Segment &sg, const Geom_Number &dist) | |
| Builds a new segment parallel to sg and with a distance dist. | |
| double | slope () const |
| double | counterclockwise_angle_with (const Segment &s) const |
| Compute the counterclock wise angle respect another segment s. | |
| double | counterclockwise_angle () const |
| Compute the counterclock angle of this respect x-axis. | |
| Geom_Number | size () const |
| bool | is_colinear_with (const Point &p) const |
| bool | is_to_left_from (const Point &p) const |
| bool | is_to_right_from (const Point &p) const |
| Point | mid_point () const |
| const Point & | nearest_point (const Point &p) const |
| Segment | get_perpendicular (const Point &p) const |
| Segment | mid_perpendicular (const Geom_Number &dist) const |
| bool | intersects_properly_with (const Segment &s) const |
| bool | contains_to (const Point &p) const |
| bool | contains_to (const Segment &s) const |
| bool | intersects_with (const Segment &s) const |
| bool | intersects_with (const Triangle &t) const |
| bool | intersects_with (const Ellipse &e) const |
| bool | is_parallel_with (const Segment &s) const |
| Point | intersection_with (const Segment &s) const |
| Sense | sense () const |
| void | enlarge_src (const Geom_Number &__dist) |
| void | enlarge_tgt (const Geom_Number &__dist) |
| std::string | to_string () const |
| operator std::string () const | |
| void | rotate (const double &angle) |
| Segment | intersection_with (const Triangle &t) const |
| Segment | intersection_with (const Ellipse &e) const |
| Segment (const Point *__a, const Point *__b) | |
| Segment (const Point &__a, const Point &__b) | |
| const bool | operator== (const Segment &segment) const |
| const bool | intersect (const Segment &segment) const |
| const Point * | get_a () |
| const Point * | get_b () |
| Point | horiz_line_inter (const Geom_Number &__y) |
| const Point * | highest_point () |
| const Point * | lowest_point () |
Friends | |
| class | Point |
| class | Triangle |
Fundamental segment defined by two points.
|
inline |
Builds a new segment given source point, slope and length.
It computes the source point by usen these equations:
(Pitágoras)
(ecuación de recta dada punto y pendiente)| [in] | __src | Source point |
| [in] | m | slope (in radians) |
| [in] | l | length |