Completely replaced the homebrew Pointf3 class with Eigen Vec3d.

Replaced the unscale macro with a template, implemented templates
for unscaling Eigen vectors.
This commit is contained in:
bubnikv 2018-08-21 17:43:05 +02:00
parent c5256bdd2c
commit cb138a20b8
46 changed files with 329 additions and 373 deletions

View file

@ -97,11 +97,11 @@ bool Line::intersection(const Line &l2, Point *intersection) const
return false; // not intersecting
}
Pointf3 Linef3::intersect_plane(double z) const
Vec3d Linef3::intersect_plane(double z) const
{
auto v = (this->b - this->a).cast<double>();
double t = (z - this->a(2)) / v(2);
return Pointf3(this->a(0) + v(0) * t, this->a(1) + v(1) * t, z);
return Vec3d(this->a(0) + v(0) * t, this->a(1) + v(1) * t, z);
}
}