mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
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:
parent
c5256bdd2c
commit
cb138a20b8
46 changed files with 329 additions and 373 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue