fix transformation functions

This commit is contained in:
Michael Kirsch 2019-05-26 19:20:21 +02:00 committed by Joseph Lenox
parent c2021aa1df
commit c55b7088cf

View File

@ -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));
} }