[Interest] Centering camera on bounding volume change in Qt3D

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


(resending forgot to cc mailing-list)

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 10:36 AM 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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230325/8e26756c/attachment.htm>


More information about the Interest mailing list