Go to the documentation of this file.
8 #ifndef FIELDS2COVER_TYPES_POINT_H_
9 #define FIELDS2COVER_TYPES_POINT_H_
11 #include <gdal/ogr_geometry.h>
25 Point(
double x,
double y,
double z = 0);
66 void setPoint(
double x,
double y,
double z = 0);
87 std::vector<T>
rotateFromPoint(
double angle,
const std::vector<T>& t)
const;
97 double angle,
const std::vector<T>& t)
const {
116 return {a.getX() + b.
getX(), a.getY() + b.
getY(), a.getZ() + b.
getZ()};
120 return {a.getX() - b.
getX(), a.getY() - b.
getY(), a.getZ() - b.
getZ()};
128 res.emplace_back(p + dir);
138 res.emplace_back(dir - p);
148 res.emplace_back(p - dir);
157 res.addGeometry(p + dir);
166 res.addGeometry(dir - p);
175 res.addGeometry(p - dir);
184 struct hash<
f2c::types::Point> {
186 return size_t(p.
getX() + p.
getY() * 1e10 + p.
getZ() * 1e20);
191 #endif // FIELDS2COVER_TYPES_POINT_H_
std::ostream & operator<<(std::ostream &os, const Point &p)
Types used by fields2cover library.
Point operator-(const Point &b) const
Point operator+(const Point &b) const
bool operator<(const Point &b) const
static Point intersectionOfLines(const Point &l1_s, const Point &l1_e, const Point &l2_s, const Point &l2_e)
Point closestPointInSegment(const Point &seg_s, const Point &seg_e) const
size_t operator()(const f2c::types::Point &p) const
bool operator==(const Point &b) const
Point operator*(double b) const
Point rotateFromPoint(double angle, const Point &p_r) const
OGRPoint operator+(const OGRPoint &a, const f2c::types::Point &b)
Point & operator*=(double b)
void setPoint(double x, double y, double z=0)
bool operator!=(const Point &b) const
double getAngleFromPoints(const Point &end) const
Point operator/(double b) const
double signedDistance2Segment(const Point &start, const Point &end) const
Point & operator=(const Point &)
Main namespace of the fields2cover library.
double getAngleFromPoint() const
OGRPoint operator-(const OGRPoint &a, const f2c::types::Point &b)
static double det(const Point &u, const Point &v)
Point getPointFromAngle(double angle, double dist) const
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31