View navigation improvements: drag limits (per view type) and generic

recentering function to restore default view and adjust it to display
the entire scene (right mouse double clic).
This commit is contained in:
brunoherbelin
2020-07-12 00:30:32 +02:00
parent e43f56b123
commit bcc800e758
6 changed files with 133 additions and 22 deletions

View File

@@ -24,8 +24,9 @@ GlmToolkit::AxisAlignedBoundingBox BoundingBoxVisitor::bbox()
void BoundingBoxVisitor::visit(Node &n)
{
// use the transform modified during update
modelview_ *= n.transform_;
// use the transform modified during update modelview_ *= n.transform_;
glm::mat4 transform_local = GlmToolkit::transform(n.translation_, n.rotation_, n.scale_);
modelview_ *= transform_local;
}
void BoundingBoxVisitor::visit(Group &n)