|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
2D point and geometric utilities. More...
#include <cmath>#include <cstddef>#include <limits>#include <iomanip>#include <string>#include <ahAssert.H>#include <ahUtils.H>#include <ah-errors.H>#include <utility>#include <gmpfrxx.h>Go to the source code of this file.
Classes | |
| struct | Geom_Object |
| struct | Point |
| Rectangular point in the plane. More... | |
| class | Polar_Point |
| Polar representation of a 2D point. More... | |
| class | Segment |
| Fundamental segment defined by two points. More... | |
| class | Triangle |
| class | Rectangle |
| class | Ellipse |
| class | Text |
Typedefs | |
| typedef mpq_class | Geom_Number |
| Numeric type used by the geometry module. | |
Functions | |
| double | geom_number_to_double (const Geom_Number &n) |
| std::ostream & | operator<< (std::ostream &o, const Geom_Number &n) |
| Geom_Number | area_of_parallelogram (const Point &a, const Point &b, const Point &c) |
| Compute the area of parallelogram defined by vectors a->b and b->c. | |
| Geom_Number | pitag (const Geom_Number &x, const Geom_Number &y) |
| Return the Euclidean distance. | |
| Geom_Number | arctan (const Geom_Number &m) |
Arc tangent of m (wrapper over mpfr). | |
| Geom_Number | arctan2 (const Geom_Number &m, const Geom_Number &n) |
| Two-argument arc tangent (wrapper over mpfr). | |
| Geom_Number | sinus (const Geom_Number &x) |
Sine of x (wrapper over mpfr). | |
| Geom_Number | cosinus (const Geom_Number &x) |
Cosine of x (wrapper over mpfr). | |
| Geom_Number | square_root (const Geom_Number &x) |
Square root of x (wrapper over mpfr). | |
| size_t | aproximate_string_size (const std::string &str) |
Variables | |
| constexpr double | PI = 3.1415926535897932384626433832795028841971693993751 |
| constexpr double | PI_2 = PI / 2.0 |
| constexpr double | PI_4 = PI / 4.0 |
| const Point | NullPoint |
2D point and geometric utilities.
This file provides classes for 2D points and geometric operations including distance calculations, vector operations, and coordinate transformations. Used by graph visualization and geometric algorithms.
Definition in file point.H.
| typedef mpq_class Geom_Number |
|
inline |
|
inline |
Arc tangent of m (wrapper over mpfr).
Definition at line 110 of file point.H.
References atan().
Referenced by Segment::mid_perpendicular(), and TEST().
|
inline |
Two-argument arc tangent (wrapper over mpfr).
Definition at line 116 of file point.H.
References atan2().
Referenced by Polar_Point::Polar_Point(), Segment::counterclockwise_angle_with(), and TEST().
|
inline |
Compute the area of parallelogram defined by vectors a->b and b->c.
Definition at line 1577 of file point.H.
References Point::get_x(), and Point::get_y().
Referenced by Triangle::Triangle(), Triangle::Triangle(), Triangle::Triangle(), Point::is_clockwise_with(), Point::is_colinear_with(), Point::is_to_left_from(), Point::is_to_right_from(), TEST(), and TEST().
|
inline |
|
inline |
Definition at line 70 of file point.H.
References __gmp_expr< mpq_t, mpq_t >::get_d().
Referenced by Eepic_Plane::compute_geom_plane(), Eepic_Plane::geom_number_to_plane(), SegmentTest::near_equal(), TEST(), Point::to_string(), and Polar_Point::to_string().
|
inline |
Definition at line 75 of file point.H.
References __gmp_expr< mpq_t, mpq_t >::get_d().
|
inline |
Return the Euclidean distance.
Euclidean distance of the vector (x, y).
Definition at line 104 of file point.H.
Referenced by Polar_Point::Polar_Point(), Segment::mid_perpendicular(), process_tag_node(), Segment::size(), TEST(), and TEST().
|
inline |
|
inline |
Square root of x (wrapper over mpfr).
Definition at line 134 of file point.H.
References sqrt().
Referenced by Ellipse::compute_tangents(), Segment::compute_tgt_point(), Ellipse::intersection_with(), and TEST().
|
extern |
|
constexpr |
Definition at line 85 of file point.H.
Referenced by Regular_Polygon::Regular_Polygon(), Segment::counterclockwise_angle_with(), process_tag_node(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
constexpr |
Definition at line 86 of file point.H.
Referenced by process_tag_node(), and TEST_F().
|
constexpr |
Definition at line 87 of file point.H.
Referenced by process_tag_node().