|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Rectangular point in the plane. More...
#include <point.H>
Public Member Functions | |
| Point () | |
| Point (const Geom_Number &__x, const Geom_Number &__y) | |
| Builds a new point in coordinates (__x, __y) | |
| Point (const Polar_Point &pp) | |
| Builds a copy of p. | |
| bool | operator== (const Point &point) const |
| bool | operator!= (const Point &point) const |
| Point | operator+ (const Point &p) const |
| Point & | operator+= (const Point &p) |
| Point | operator- (const Point &p) const |
| Point & | operator-= (const Point &p) |
| const Geom_Number & | get_x () const |
| Returns x value. | |
| const Geom_Number & | get_y () const |
| Returns y value. | |
| bool | is_colinear_with (const Point &p1, const Point &p2) const |
| Returns true if this is colinear with p1 and p2. | |
| bool | is_colinear_with (const Segment &s) const |
| Returns true if this is colinear with segment s. | |
| bool | is_to_left_from (const Point &p1, const Point &p2) const |
| Return true if this is to left from points p1 and p2. | |
| bool | is_to_right_from (const Point &p1, const Point &p2) const |
| Return true if this is to right from points p1 and p2. | |
| bool | is_to_left_on_from (const Point &p1, const Point &p2) const |
| Return true if this is to left from (or on) points p1 and p2. | |
| bool | is_to_right_on_from (const Point &p1, const Point &p2) const |
| Return true if this is to right from (or on) points p1 and p2. | |
| bool | is_clockwise_with (const Point &p1, const Point &p2) const |
| Returns true if the sequence this-p1-p2 is clockwise. | |
| bool | is_to_left_from (const Segment &s) const |
| bool | is_to_right_from (const Segment &s) const |
| bool | is_clockwise_with (const Segment &s) const |
| bool | is_between (const Point &p1, const Point &p2) const |
| Returns true if this is between p1 and p2. | |
| const Point & | nearest_point (const Point &p1, const Point &p2) const |
| Return the nearest point (to this) between p1 and p2. | |
| bool | is_inside (const Segment &s) const |
| Returns true if this is inside of segment s. | |
| bool | is_inside (const Ellipse &e) const |
| Returns true if this is inside of the ellipse e. | |
| bool | intersects_with (const Ellipse &e) const |
Returns true if this intersects ellipse e. | |
| std::string | to_string () const |
| Return a string representation of this. | |
| operator std::string () const | |
| String cast operator. | |
| Geom_Number | distance_squared_to (const Point &that) const |
| Returns the square distance between this y that. | |
| Geom_Number | distance_with (const Point &p) const |
| Returns the Euclidean distance between this and p. | |
| const Point & | highest_point () const |
| const Point & | lowest_point () const |
| const Point & | leftmost_point () const |
| const Point & | rightmost_point () const |
| bool | operator== (const Point &other) const |
| double | distance () const |
| bool | operator< (const Point &other) const |
Public Member Functions inherited from Geom_Object | |
| Geom_Object ()=default | |
| virtual | ~Geom_Object ()=default |
Public Attributes | |
| int | x |
| int | y |
| double | x |
| double | y |
Private Attributes | |
| Geom_Number | x |
| Geom_Number | y |
Friends | |
| class | Segment |
| class | Triangle |
| class | Polar_Point |
Rectangular point in the plane.
Fundamental class which defines a point in a cartesians coordinates plane.
|
inline |
|
inline |
|
inline |
Definition at line 870 of file fibonacci_heap_test.cc.
Referenced by operator<().
|
inline |
Returns the square distance between this y that.
Definition at line 871 of file point.H.
References Aleph::maps(), x, and y.
|
inline |
Returns the Euclidean distance between this and p.
Definition at line 880 of file point.H.
References Aleph::maps(), and Aleph::HTList::size().
Referenced by Ellipse::compute_tangents(), nearest_point(), TEST(), and TEST().
|
inline |
Returns x value.
Definition at line 221 of file point.H.
References x.
Referenced by area_of_parallelogram(), between(), Ellipse::compute_radius(), Rectangle::contains(), demo_coverage_area(), Rectangle::distance_squared_to(), Segment::get_perpendicular(), Polar_Point::get_quadrant(), Ellipse::highest_point(), Ellipse::intersection_with(), is_between(), Ellipse::leftmost_point(), Ellipse::lowest_point(), main(), Segment::mid_point(), operator<<(), points_equal(), print_point(), print_triangle(), Ellipse::rightmost_point(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and triangle_area().
|
inline |
Returns y value.
Definition at line 226 of file point.H.
References y.
Referenced by area_of_parallelogram(), between(), Ellipse::compute_radius(), Rectangle::contains(), demo_coverage_area(), Rectangle::distance_squared_to(), Segment::get_perpendicular(), Polar_Point::get_quadrant(), Ellipse::highest_point(), Ellipse::intersection_with(), is_between(), Ellipse::leftmost_point(), Ellipse::lowest_point(), main(), Segment::mid_point(), operator<<(), points_equal(), print_point(), print_triangle(), Ellipse::rightmost_point(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and triangle_area().
Returns true if this intersects ellipse e.
Definition at line 1460 of file point.H.
References Ellipse::intersects_with().
Returns true if this is between p1 and p2.
Definition at line 277 of file point.H.
References get_x(), get_y(), is_colinear_with(), and Aleph::maps().
Referenced by Segment::contains_to(), and Segment::contains_to().
Returns true if the sequence this-p1-p2 is clockwise.
Definition at line 265 of file point.H.
References area_of_parallelogram().
Referenced by is_clockwise_with().
Definition at line 864 of file point.H.
References is_clockwise_with(), Segment::src, and Segment::tgt.
Returns true if this is colinear with p1 and p2.
Definition at line 232 of file point.H.
References area_of_parallelogram().
Referenced by Segment::intersects_properly_with(), is_between(), Segment::is_colinear_with(), and is_colinear_with().
Returns true if this is colinear with segment s.
Definition at line 846 of file point.H.
References is_colinear_with(), Segment::src, and Segment::tgt.
Returns true if this is inside of the ellipse e.
Definition at line 1454 of file point.H.
References Ellipse::contains_to().
Returns true if this is inside of segment s.
Definition at line 840 of file point.H.
References Segment::contains_to().
Return true if this is to left from points p1 and p2.
Definition at line 241 of file point.H.
References area_of_parallelogram().
Referenced by Triangle::contains_to(), Segment::intersects_properly_with(), is_to_left_from(), Segment::is_to_right_from(), and is_to_right_on_from().
Definition at line 852 of file point.H.
References is_to_left_from(), Segment::src, and Segment::tgt.
Return true if this is to left from (or on) points p1 and p2.
Definition at line 253 of file point.H.
References is_to_right_from(), and Aleph::maps().
Return true if this is to right from points p1 and p2.
Definition at line 247 of file point.H.
References area_of_parallelogram().
Referenced by Segment::is_to_left_from(), is_to_left_on_from(), is_to_right_from(), and Segment::mid_perpendicular().
Definition at line 858 of file point.H.
References is_to_right_from(), Segment::src, and Segment::tgt.
Return true if this is to right from (or on) points p1 and p2.
Definition at line 259 of file point.H.
References is_to_left_from(), and Aleph::maps().
Return the nearest point (to this) between p1 and p2.
Definition at line 291 of file point.H.
References distance_with().
Referenced by Segment::nearest_point().
|
inline |
Definition at line 190 of file point.H.
References Aleph::maps().
Definition at line 872 of file fibonacci_heap_test.cc.
References distance(), and Aleph::maps().
Definition at line 966 of file dynsethash.cc.
References Aleph::maps(), x, and y.
|
inline |
Return a string representation of this.
Definition at line 306 of file point.H.
References geom_number_to_double(), x, and y.
Referenced by operator std::string(), and Segment::to_string().
|
friend |
|
private |
Definition at line 161 of file point.H.
Referenced by Polar_Point::Polar_Point(), Segment::compute_slope(), Segment::compute_tgt_point(), Segment::counterclockwise_angle_with(), distance(), distance_squared_to(), get_x(), Segment::intersection_with(), Segment::leftmost_point(), Triangle::leftmost_point(), operator+(), operator+=(), operator-(), operator-=(), operator==(), operator==(), Segment::rightmost_point(), Triangle::rightmost_point(), Segment::sense(), Segment::size(), TEST(), and to_string().
| int Point::x |
Definition at line 964 of file dynsethash.cc.
| double Point::x |
Definition at line 869 of file fibonacci_heap_test.cc.
|
private |
Definition at line 162 of file point.H.
Referenced by Polar_Point::Polar_Point(), Segment::compute_slope(), Segment::compute_tgt_point(), Segment::counterclockwise_angle_with(), distance(), distance_squared_to(), get_y(), Segment::highest_point(), Triangle::highest_point(), Segment::intersection_with(), Segment::lowest_point(), Triangle::lowest_point(), operator+(), operator+=(), operator-(), operator-=(), operator==(), operator==(), Segment::sense(), Segment::size(), TEST(), and to_string().
| int Point::y |
Definition at line 964 of file dynsethash.cc.
| double Point::y |
Definition at line 869 of file fibonacci_heap_test.cc.