[Interest] Qt3D - Bounds of visible entities
Andy
asmaloney at gmail.com
Mon Mar 27 16:15:15 CEST 2017
On Sun, Mar 26, 2017 at 5:12 AM, Mike Krus <mike.krus at kdab.com> wrote:
> Hi Andy
>
> > On 26 Mar 2017, at 00:51, Andy <asmaloney at gmail.com> wrote:
> > Are there plans to add an interface to get the bounds of visible
> entities (ones with geometry that is rendered)?
> >
> > Seems like something a lot of developers would need for moving the
> camera around - centering scenes, handling standard camera views (top,
> left, right, etc.), zooming in to a specific object, etc..
> support for some of these basic operations is in the works for 5.10. Due
> to frontend/backend split and heavy multithreading in Qt3D, it’s not
> trivial to expose such data structures directly as they are maintained by
> the backend. See https://codereview.qt-project.org/#/c/183705/ and
> previous few patches.
>
Thanks for the response Mike.
That change set looks like it would cover a lot of use-cases w.r.t. the
camera. Unfortunately 5.10 looks to be a little less than a year away
(given the current 5.9 timeline). Is there any chance something like this
could land earlier - 5.9.1?
>
> Access to bounding volume data structures will come in some form but how
> exactly is unclear yet.
>
> Also bounding volumes in the backend are computed as spheres which may or
> may not fit for your purpose (for example, they are not very useful as a
> basis for displaying a box around selected objects).
>
Right - displaying selection of objects is likely another common, obvious
use-case. Are there plans to calculate/store bounding boxes at some point?
>
> > If we do have to do it outside the framework, what would be the general
> approach? I haven't quite figured out how to do it with the current public
> API.
> >
> > I have a QEntity-derived class, and I wanted to look for
> QGeometryRenderer/QTransform components being added to it, hook in to their
> signals, and calculate & store the info on the entity. But as far as I can
> tell there's no way for an entity to receive notification that components
> are added/removed. The addComponent() and removeComponent() methods aren't
> virtual so I can't override them either.
> frontend and backend nodes don’t rely on signals and slots to communicate
> change notifications, but use change messages. There is a
> QComponentAddedChange message, but I don’t think a frontend node can listen
> to it’s own change messages.
>
> > Is there an easier approach that I'm missing?
> I think currently you would have to maintain all the necessary information
> in your application, making sure it’s updated when the scene graph changes,
> etc.
>
> Hope this helps,
>
> Mike
>
> --
> Mike Krus | mike.krus at kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company
> Tel: UK Office +44 1625 809908 Mobile +44 7833 491941
> KDAB - The Qt Experts
>
>
---
Andy Maloney // https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170327/4486ba8d/attachment.html>
More information about the Interest
mailing list