mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-03 22:16:36 +08:00
fix transformation functions
This commit is contained in:
parent
c2021aa1df
commit
c55b7088cf
@ -283,7 +283,7 @@ TriangleMesh::WriteOBJFile(const std::string &output_file) const {
|
|||||||
TriangleMesh TriangleMesh::get_transformed_mesh(TransformationMatrix const & trafo) const
|
TriangleMesh TriangleMesh::get_transformed_mesh(TransformationMatrix const & trafo) const
|
||||||
{
|
{
|
||||||
TriangleMesh mesh;
|
TriangleMesh mesh;
|
||||||
std::vector<float> trafo_arr = trafo.matrix3x4f();
|
std::vector<double> trafo_arr = trafo.matrix3x4f();
|
||||||
stl_get_transform(&(this->stl), &(mesh.stl), trafo_arr.data());
|
stl_get_transform(&(this->stl), &(mesh.stl), trafo_arr.data());
|
||||||
stl_invalidate_shared_vertices(&(mesh.stl));
|
stl_invalidate_shared_vertices(&(mesh.stl));
|
||||||
return mesh;
|
return mesh;
|
||||||
@ -291,7 +291,7 @@ TriangleMesh TriangleMesh::get_transformed_mesh(TransformationMatrix const & tra
|
|||||||
|
|
||||||
void TriangleMesh::transform(TransformationMatrix const & trafo)
|
void TriangleMesh::transform(TransformationMatrix const & trafo)
|
||||||
{
|
{
|
||||||
std::vector<float> trafo_arr = trafo.matrix3x4f();
|
std::vector<double> trafo_arr = trafo.matrix3x4f();
|
||||||
stl_transform(&(this->stl), trafo_arr.data());
|
stl_transform(&(this->stl), trafo_arr.data());
|
||||||
stl_invalidate_shared_vertices(&(this->stl));
|
stl_invalidate_shared_vertices(&(this->stl));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user