mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
Tweaks to GLGizmoFlatten
This commit is contained in:
parent
b9bb821392
commit
87565a0686
6 changed files with 77 additions and 52 deletions
|
@ -7,6 +7,18 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
Linef3 transform(const Linef3& line, const Transform3d& t)
|
||||
{
|
||||
typedef Eigen::Matrix<double, 3, 2> LineInMatrixForm;
|
||||
|
||||
LineInMatrixForm world_line;
|
||||
::memcpy((void*)world_line.col(0).data(), (const void*)line.a.data(), 3 * sizeof(double));
|
||||
::memcpy((void*)world_line.col(1).data(), (const void*)line.b.data(), 3 * sizeof(double));
|
||||
|
||||
LineInMatrixForm local_line = t * world_line.colwise().homogeneous();
|
||||
return Linef3(Vec3d(local_line(0, 0), local_line(1, 0), local_line(2, 0)), Vec3d(local_line(0, 1), local_line(1, 1), local_line(2, 1)));
|
||||
}
|
||||
|
||||
bool Line::intersection_infinite(const Line &other, Point* point) const
|
||||
{
|
||||
Vec2d a1 = this->a.cast<double>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue