Optimization of Model bounding box routines (avoids copying the mesh),

optimization of the admesh rotate function (also made numerically more robust).
This commit is contained in:
bubnikv 2016-11-16 11:53:29 +01:00
parent 52de3940fe
commit 4c407c8a59
3 changed files with 100 additions and 25 deletions

View file

@ -215,6 +215,10 @@ public:
// To be called on an external mesh
void transform_mesh(TriangleMesh* mesh, bool dont_translate = false) const;
// Calculate a bounding box of a transformed mesh. To be called on an external mesh.
BoundingBoxf3 transform_mesh_bounding_box(const TriangleMesh* mesh, bool dont_translate = false) const;
// Transform an external bounding box.
BoundingBoxf3 transform_bounding_box(const BoundingBoxf3 &bbox, bool dont_translate = false) const;
// To be called on an external polygon. It does not translate the polygon, only rotates and scales.
void transform_polygon(Polygon* polygon) const;