Added member BoundingBoxf3 m_bounding_box to GLIndexedVertexArray and removed member BoundingBoxf3 bounding_box from GLVolume

This commit is contained in:
Enrico Turri 2019-07-01 13:26:06 +02:00
parent 4269c8b23c
commit 2356fe5a13
5 changed files with 30 additions and 58 deletions

View file

@ -136,7 +136,7 @@ void GLGizmoScale3D::on_render(const Selection& selection) const
for (unsigned int idx : idxs)
{
const GLVolume* vol = selection.get_volume(idx);
m_box.merge(vol->bounding_box.transformed(vol->get_volume_transformation().get_matrix()));
m_box.merge(vol->bounding_box().transformed(vol->get_volume_transformation().get_matrix()));
}
// gets transform from first selected volume
@ -151,7 +151,7 @@ void GLGizmoScale3D::on_render(const Selection& selection) const
else if (single_volume)
{
const GLVolume* v = selection.get_volume(*selection.get_volume_idxs().begin());
m_box = v->bounding_box;
m_box = v->bounding_box();
m_transform = v->world_matrix();
angles = Geometry::extract_euler_angles(m_transform);
// consider rotation+mirror only components of the transform for offsets