26 pvecerror(
"plane::plane( const straight& sl, const point& pt)");
34 : piv(sl1.Gpiv()), dir() {
36 "plane::plane( const straight& sl1, const straight& sl2, vfloat prec)");
50 pvecerror(
"int operator==(const plane &pl1, const plane &pl2)");
52 if (!(pl1.
dir == pl2.
dir || pl1.
dir == -pl2.
dir))
return 0;
53 if (pl1.
piv == pl2.
piv)
return 1;
61 pvecerror(
"bool apeq(const plane &pl1, const plane &pl2, vfloat prec)");
62 if (check_par(pl1.
dir, pl2.
dir, prec) == 0)
return false;
68 pvecerror(
"int plane::check_point_in(point fp, vfloat prec)");
70 if (f < prec)
return 1;
75 pvecerror(
"point plane::cross(straight &sl)");
80 if (slpiv ==
piv || check_perp((
piv - slpiv),
dir, 0.0) == 1) {
90 return point(slpiv.
v + t / r * sldir);
94 pvecerror(
"point plane::cross(plane &pl)");
99 if (plpiv ==
piv || check_par(pldir,
dir, 0.0) != 0) {
115 int& qcrpll,
vfloat prec)
const {
116 pvecerror(
"int plane::cross(polyline &pll, ...");
120 for (
int n = 0; n < pll.
qsl; n++) {
127 vec v1 = cpt - pll.
pt[n];
134 vec v2 = cpt - pll.
pt[n + 1];
137 else if (check_par(v1, v2, prec) == -1)
143 if (qcrpt > 0 || qcrpll > 0)
150 pvecerror(
"vfloat plane::distance(point& fpt)");
151 if (fpt ==
piv)
return 0.0;
Plane, defined by defined by a point and a vector normal to the plane.
static absrefabsref::*[2] aref
point cross(const straight &sl) const
friend bool apeq(const plane &pl1, const plane &pl2, vfloat prec)
point piv
Origin point, pivot.
vec dir
Direction of normal, unit vector.
int check_point_in(const point &fp, vfloat prec) const
vfloat distance(const point &fpt) const
virtual absref_transmit get_components() override
Definition of 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)