#include <point.H>
Diagrama de herencias de Segment
Diagrama de colaboración para Segment:Tipos públicos | |
| enum | Sense { E, NE, N, NW, W, S, SW, SE } |
Métodos públicos | |
| bool | operator== (const Segment &s) const |
| bool | operator!= (const Segment &s) const |
| const Point & | highest_point () const |
| Retorna el punto del segmento más al norte. | |
| const Point & | lowest_point () const |
| Retorna el punto del segmento más al sur. | |
| const Point & | leftmost_point () const |
| Retorna el punto del segmento más al oeste. | |
| const Point & | rightmost_point () const |
| Retorna el punto del segmento más al este. | |
| const Point & | get_src_point () const |
| retorna el punto inicial del segmento | |
| const Point & | get_tgt_point () const |
| retorna el punto final del segmento | |
| Segment (const Segment &s) | |
| Segment (const Point &__src, const Point &__tgt) | |
| constructor fundamental dados los puntos origen y destino | |
| Segment (const Point &__src, const Geom_Number &m, const Geom_Number &d) | |
| Segment (const Segment &sg, const Geom_Number &dist) | |
| double | slope () const |
| 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 | 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 () |
Métodos públicos heredados desde Geom_Object | |
| Geom_Object (const Geom_Object &) | |
Amigas | |
| class | Point |
| class | Triangle |
Clase fundamental segmento definido por dos puntos
|
inline |
Construye un segmento dado un punto de origen y su pendiente
Calcula el punto de origen según el siguiente par de ecuaciones:
(Pitágoras)
(ecuación de recta dada punto y pendiente)| [in] | __src | punto origen del segmento |
| [in] | m | pendiente en radianes |
| [in] | d | longitud del segmento |