|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
#include <eepicgeom.H>
Public Member Functions | |
| Thick_Arrow () | |
| Thick_Arrow (const Segment &s) | |
| Thick_Arrow (const Point &__src, const Point &__tgt) | |
| Thick_Arrow (const Point &__src, const Geom_Number &m, const Geom_Number &d) | |
Public Member Functions inherited from Aleph::Segment | |
| bool | operator== (const Segment &s) const noexcept |
| Checks for equality between two segments. | |
| bool | operator!= (const Segment &s) const noexcept |
| Checks for inequality between two segments. | |
| const Point & | highest_point () const noexcept |
| Gets the endpoint with the largest y-coordinate. | |
| const Point & | lowest_point () const noexcept |
| Gets the endpoint with the smallest y-coordinate. | |
| const Point & | leftmost_point () const noexcept |
| Gets the endpoint with the smallest x-coordinate. | |
| const Point & | rightmost_point () const noexcept |
| Gets the endpoint with the largest x-coordinate. | |
| const Point & | get_src_point () const noexcept |
| Gets the source point of the segment. | |
| const Point & | get_tgt_point () const noexcept |
| Gets the target point of the segment. | |
| Segment ()=default | |
| Default constructor. | |
| Segment (Point src, Point tgt) | |
| Constructs a segment from two endpoints. | |
| Segment (Point src, const Geom_Number &m, const Geom_Number &l) | |
| Constructs a new segment from a source point, slope, and length. | |
| Segment (const Segment &sg, const Geom_Number &dist) | |
| Constructs a new segment parallel to a given segment at a specified distance. | |
| double | slope () const |
| Returns the slope of the segment. | |
| Geom_Number | slope_exact () const |
Returns the exact slope of the segment as a Geom_Number. | |
| double | counterclockwise_angle_with (const Segment &s) const |
| Computes the counter-clockwise rotation angle FROM this segment TO another. | |
| double | counterclockwise_angle () const |
| Computes the counter-clockwise angle of this segment with respect to the x-axis. | |
| Geom_Number | length () const |
| Returns the Euclidean length of the segment. | |
| Geom_Number | size () const |
| bool | is_colinear_with (const Point &p) const |
| Checks if a point is collinear with this segment. | |
| bool | is_left_of (const Point &p) const |
| Checks if this segment is to the left of a given point. | |
| bool | is_right_of (const Point &p) const |
| Checks if this segment is to the right of a given point. | |
| bool | is_to_left_from (const Point &p) const |
| bool | is_to_right_from (const Point &p) const |
| Point | mid_point () const |
| Returns the midpoint of this segment. | |
| Segment | reversed () const |
| Returns a new segment with the endpoints swapped. | |
| Point | at (const Geom_Number &t) const |
| Evaluates a point on the segment via linear interpolation. | |
| Point | project (const Point &p) const |
| Orthogonal projection of a point onto this segment's infinite line, clamped to the segment's endpoints. | |
| Geom_Number | distance_to (const Point &p) const |
| Calculates the Euclidean distance from a point to this segment. | |
| const Point & | nearest_point (const Point &p) const |
| Returns whichever endpoint of this segment is nearer to a given point. | |
| Segment | get_perpendicular (const Point &p) const |
Constructs a segment perpendicular to this that passes through point p. | |
| Segment | mid_perpendicular (const Geom_Number &dist) const |
| Returns the perpendicular chord of a given length passing through the midpoint. | |
| bool | intersects_properly_with (const Segment &s) const |
| Checks if this segment properly intersects another segment. | |
| bool | contains (const Point &p) const |
| Checks if a point lies on this segment. | |
| bool | contains_to (const Point &p) const |
| bool | contains (const Segment &s) const |
Checks if another segment s lies entirely inside this segment. | |
| bool | contains_to (const Segment &s) const |
| bool | intersects_with (const Segment &s) const |
| Checks if this segment intersects another one (including endpoints and collinear overlap). | |
| bool | intersects_with (const Triangle &t) const |
| Checks if this segment intersects a triangle. | |
| bool | intersects_with (const Ellipse &e) const |
| Checks if this segment intersects an ellipse. | |
| bool | is_parallel_with (const Segment &s) const |
| Checks if this segment is parallel to another one. | |
| Point | intersection_with (const Segment &s) const |
| Computes the intersection point of the infinite lines defined by two segments. | |
| Sense | sense () const |
| Determines the cardinal/intercardinal direction of the segment. | |
| void | enlarge_src (const Geom_Number &dist) |
| Extends the segment by a given distance from the source endpoint. | |
| void | enlarge_tgt (const Geom_Number &dist) |
| Extends the segment by a given distance from the target endpoint. | |
| std::string | to_string () const |
| Returns a string representation of the segment, e.g., "(x1,y1)(x2,y2)". | |
| operator std::string () const | |
Cast operator to std::string. | |
| void | rotate (const Geom_Number &angle) |
| Rotates the segment by a given angle around its source point. | |
| Segment | intersection_with (const Triangle &t) const |
| Computes the intersection segment with a triangle. | |
| Segment | intersection_with (const Ellipse &e) const |
| Computes the intersection segment with an ellipse. | |
Public Member Functions inherited from Aleph::Geom_Object | |
| Geom_Object ()=default | |
| virtual | ~Geom_Object ()=default |
Additional Inherited Members | |
Public Types inherited from Aleph::Segment | |
| enum | Sense { E , NE , N , NW , W , SW , S , SE } |
| Cardinal and intercardinal directions associated with a segment's vector. More... | |
Definition at line 1220 of file eepicgeom.H.
|
inline |
Definition at line 1220 of file eepicgeom.H.
Definition at line 1220 of file eepicgeom.H.
Definition at line 1220 of file eepicgeom.H.
|
inline |
Definition at line 1220 of file eepicgeom.H.