27 pvecerror(
"plane::plane( const straight& sl, const point& pt)");
35 : piv(sl1.Gpiv()), dir() {
37 "plane::plane( const straight& sl1, const straight& sl2, vfloat prec)");
51 pvecerror(
"int operator==(const plane &pl1, const plane &pl2)");
53 if (!(pl1.
dir == pl2.
dir || pl1.
dir == -pl2.
dir))
return 0;
54 if (pl1.
piv == pl2.
piv)
return 1;
62 pvecerror(
"bool apeq(const plane &pl1, const plane &pl2, vfloat prec)");
63 if (check_par(pl1.
dir, pl2.
dir, prec) == 0)
return false;
69 pvecerror(
"int plane::check_point_in(point fp, vfloat prec)");
71 if (f < prec)
return 1;
76 pvecerror(
"point plane::cross(straight &sl)");
81 if (slpiv ==
piv || check_perp((
piv - slpiv),
dir, 0.0) == 1) {
91 return point(slpiv.
v + t / r * sldir);
95 pvecerror(
"point plane::cross(plane &pl)");
100 if (plpiv ==
piv || check_par(pldir,
dir, 0.0) != 0) {
117 int& qcrpll,
vfloat prec)
const {
118 pvecerror(
"int plane::cross(polyline &pll, ...");
122 for (
int n = 0; n < pll.
qsl; n++) {
129 vec v1 = cpt - pll.
pt[n];
136 vec v2 = cpt - pll.
pt[n + 1];
139 else if (check_par(v1, v2, prec) == -1)
145 if (qcrpt > 0 || qcrpll > 0)
152 pvecerror(
"vfloat plane::distance(point& fpt)");
153 if (fpt ==
piv)
return 0.0;
Plane, defined by defined by a point and a vector normal to the plane.
point cross(const straight &sl) const
friend bool apeq(const plane &pl1, const plane &pl2, vfloat prec)
static absref absref::* aref[2]
point piv
Origin point, pivot.
vec dir
Direction of normal, unit vector.
int check_point_in(const point &fp, vfloat prec) const
Return 1 if a point is in the plane (within precision prec).
vfloat distance(const point &fpt) const
virtual absref_transmit get_components() override
Straight line, as combination of vector and point.
point cross(const straight &sl, vfloat prec) const
int check_point_in(const point &fp, vfloat prec) const
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)
bool apeq(const circumf &f1, const circumf &f2, vfloat prec)
int operator==(const circumf &f1, const circumf &f2)
DoubleAc fabs(const DoubleAc &f)
#define pvecerror(string)