Go to the documentation of this file.
14 this->
data_->setX(_x);
15 this->
data_->setY(_y);
16 this->
data_->setZ(_z);
38 os <<
"Point(" << p.
X() <<
", " << p.
Y() <<
", " << p.
Z() <<
")";
43 return (fabs(this->
X() - b.
X()) < 1e-7) && \
44 (fabs(this->
Y() - b.
Y()) < 1e-7) && \
45 (fabs(this->
Z() - b.
Z()) < 1e-7);
53 return ((this->
X() < b.
X()) ||
54 ((this->X() == b.
X()) && (this->Y() < b.
Y())));
58 return Point(
X() + b.
X(),
Y() + b.
Y(),
Z() + b.
Z());
62 return Point(
X() - b.
X(),
Y() - b.
Y(),
Z() - b.
Z());
66 data_->setX(this->
X() * b);
67 data_->setY(this->
Y() * b);
68 data_->setZ(this->
Z() * b);
73 return Point(
X() * b,
Y() * b,
Z() * b);
77 return X() * b.
X() +
Y() * b.
Y() +
Z() * b.
Z();
81 return Point(
X() / b,
Y() / b,
Z() / b);
85 return u.
X() * v.
Y() - u.
Y() * v.
X();
89 return Point(this->
X(), this->
Y(), this->
Z());
110 data_->setX(p.getX());
111 data_->setY(p.getY());
112 data_->setZ(p.getZ());
122 const double s = sin(angle);
123 const double c = cos(angle);
124 double x = this->
X();
125 double y = this->
Y();
126 double p_x = p_r.
X() - x;
127 double p_y = p_r.
Y() - y;
128 return Point(p_x * c - p_y * s + x,
129 p_x * s + p_y * c + y);
137 return Point(1.0, 0.0).getAngleFromPoints(*
this);
146 return Point(
X() + dist * cos(angle),
Y() + dist * sin(angle));
151 Point this2start {start - *
this};
153 return -
det(end2start, this2start) / sqrt(end2start * end2start);
160 double den =
det(l1_e - l1_s, l2_e - l2_s);
164 double det1 =
det(l1_e, l1_s);
165 double det2 =
det(l2_e, l2_s);
166 return ((l2_e - l2_s) * det1 - (l1_e - l1_s) * det2) / den;
170 const Point& seg_s,
const Point& seg_e)
const {
171 Point v = seg_e - seg_s;
172 Point u = seg_s - *
this;
173 double t = -(v * u) / (v * v);
174 return v * std::max(0.0, std::min(1.0, t)) + seg_s;
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
bool operator==(const Point &b) const
Point operator*(double b) const
Point rotateFromPoint(double angle, const Point &p_r) const
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
static double mod_2pi(double val)
Point & operator=(const Point &)
std::shared_ptr< OGRPoint > data_
double getAngleFromPoint() const
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