Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Arrow Struct Reference

Segment-drawing variants (types). More...

#include <eepicgeom.H>

Inheritance diagram for Arrow:
[legend]
Collaboration diagram for Arrow:
[legend]

Public Member Functions

 Arrow ()
 
 Arrow (const Segment &s)
 
 Arrow (const Point &__src, const Point &__tgt)
 
 Arrow (const Point &__src, const Geom_Number &m, const Geom_Number &d)
 
- Public Member Functions inherited from Segment
bool operator== (const Segment &s) const
 
bool operator!= (const Segment &s) const
 
const Pointhighest_point () const
 
const Pointlowest_point () const
 
const Pointleftmost_point () const
 
const Pointrightmost_point () const
 
const Pointget_src_point () const
 
const Pointget_tgt_point () const
 
 Segment ()=default
 
 Segment (Point __src, const Point &__tgt)
 
 Segment (Point __src, const Geom_Number &m, const Geom_Number &l)
 Builds a new segment given source point, slope and length.
 
 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 counterclockwise wise angle respect another segment s.
 
double counterclockwise_angle () const
 Compute the counterclockwise angle of this respect x-axis.
 
Geom_Number size () const
 Return the Euclidean length of the segment (distance between endpoints).
 
bool is_colinear_with (const Point &p) const
 Return true if p is colinear with this segment.
 
bool is_to_left_from (const Point &p) const
 Return true if this segment is to the left of point p.
 
bool is_to_right_from (const Point &p) const
 Return true if this segment is to the right of point p.
 
Point mid_point () const
 Return the midpoint of this segment.
 
const Pointnearest_point (const Point &p) const
 Return whichever endpoint is nearer to p.
 
Segment get_perpendicular (const Point &p) const
 Construct the segment perpendicular to this passing through p.
 
Segment mid_perpendicular (const Geom_Number &dist) const
 Return the perpendicular chord of length 2*dist through the midpoint.
 
bool intersects_properly_with (const Segment &s) const
 Return true if the segments intersect at interior points only.
 
bool contains_to (const Point &p) const
 Return true if p lies on this segment.
 
bool contains_to (const Segment &s) const
 Return true if s lies entirely inside this segment.
 
bool intersects_with (const Segment &s) const
 Return true if s intersects this segment (including endpoints).
 
bool intersects_with (const Triangle &t) const
 
bool intersects_with (const Ellipse &e) const
 
bool is_parallel_with (const Segment &s) const
 Return true if s has the same slope.
 
Point intersection_with (const Segment &s) const
 Compute intersection point solving point-slope equations for both lines.
 
Sense sense () const
 
void enlarge_src (const Geom_Number &__dist)
 Extend the segment by __dist from the source endpoint.
 
void enlarge_tgt (const Geom_Number &__dist)
 Extend the segment by __dist from the target endpoint.
 
std::string to_string () const
 Return "(src)(tgt)" textual form.
 
 operator std::string () const
 
void rotate (const double &angle)
 Rotate the segment by angle (radians) around the source point.
 
Segment intersection_with (const Triangle &t) const
 
Segment intersection_with (const Ellipse &e) const
 
- Public Member Functions inherited from Geom_Object
 Geom_Object ()=default
 
virtual ~Geom_Object ()=default
 

Additional Inherited Members

- Public Types inherited from Segment
enum  Sense {
  E , NE , N , NW ,
  W , S , SW , SE
}
 Cardinal directions associated with a segment. More...
 

Detailed Description

Segment-drawing variants (types).

These are distinct Segment-derived types so they can have distinct EEPIC drawing behavior.

Definition at line 1205 of file eepicgeom.H.

Constructor & Destructor Documentation

◆ Arrow() [1/4]

Arrow::Arrow ( )
inline

Definition at line 1205 of file eepicgeom.H.

◆ Arrow() [2/4]

Arrow::Arrow ( const Segment s)
inline

Definition at line 1205 of file eepicgeom.H.

◆ Arrow() [3/4]

Arrow::Arrow ( const Point __src,
const Point __tgt 
)
inline

Definition at line 1205 of file eepicgeom.H.

◆ Arrow() [4/4]

Arrow::Arrow ( const Point __src,
const Geom_Number m,
const Geom_Number d 
)
inline

Definition at line 1205 of file eepicgeom.H.


The documentation for this struct was generated from the following file: