[Interest] Centering camera on bounding volume change in Qt3D

Maxime Roussin-Bélanger maxime.roussinbelanger at gmail.com
Sat Mar 25 16:04:15 CET 2023


Hello,

The entity change is caused by user input, the user moves the mouse over
the entity and changes its shape, or it can use
a menu to change the entity shape. I think I would have to inject the
camera into _every_ entity object?

Max.


On Sat, Mar 25, 2023 at 10:54 AM Mike Krus <mike.krus at kdab.com> wrote:

> Hi
>
> Well, do you know what is causing the size of the entity to change? Could
> it be something in your application that is
> changing the geometry of the object, or the transform matrix? You could
> just call viewAll after this?
>
> Mike
>
> > On 25 Mar 2023, at 14:36, Maxime Roussin-Bélanger <
> maxime.roussinbelanger at gmail.com> wrote:
> >
> > Hello,
> >
> > Moving the camera is fine. The problem is how I can be notified when any
> entity changes shape in the scene. When the entity's shape changes
> > I expect the bounding sphere to change; when that happens, I would like
> to call `viewAll()`.
> >
> > Max.
> >
> > On Sat, Mar 25, 2023 at 2:16 AM Mike Krus <mike.krus at kdab.com> wrote:
> > Hi
> >
> > Have you tried to call QCamera::viewAll() ?
> >
> >
> > Mike
> >
> >
> > > On 24 Mar 2023, at 21:38, Maxime Roussin-Bélanger <
> maxime.roussinbelanger at gmail.com> wrote:
> > >
> > > Hi there,
> > >
> > > Despite searching through the documentation, I couldn't find a
> solution to my problem. I have a 3D scene, and I am trying to center the
> camera when the bounding volume of the scene changes. Essentially, if an
> entity's width/height/depth changes and/or when I add a new entity, I would
> like the camera to remain pointed at the center of the bounding sphere. Do
> you have any suggestions or resources that may help achieve this? I need
> some sort of signal I guess?
> > >
> > > If something in the Private API can be helpful, I might bind on this,
> but I would rather not.
> > >
> > > Thanks,
> > > Max
> > > _______________________________________________
> > > Interest mailing list
> > > Interest at qt-project.org
> > > https://lists.qt-project.org/listinfo/interest
> >
> > —
> > Mike Krus | mike.krus at kdab.com | Senior Software Engineer & Teamlead
> > KDAB (UK) Ltd., a KDAB Group company
> > Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
> > KDAB - The Qt Experts, C++, OpenGL Experts
> >
>
>> Mike Krus | mike.krus at kdab.com | Senior Software Engineer & Teamlead
> KDAB (UK) Ltd., a KDAB Group company
> Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
> KDAB - The Qt Experts, C++, OpenGL Experts
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230325/5aac96f7/attachment.htm>


More information about the Interest mailing list