[Interest] QT3d Dynamic Mesh

Sean Harmer sean.harmer at kdab.com
Sun Oct 11 19:37:22 CEST 2015


Hi,

The API for this has changed a little in 5.6. The geometric data is now 
contained in one or more QBuffer objects and is referenced by one or 
more QAttributes that describe the data layout in the buffers. The 
QAttributes are rendered by adding them to a QGeometryRenderer component.

You can either update the above objects on the main thread and call 
update() or as before you can also use a functor to have the backend 
generate the dynamic data.

Cheers,

Sean

On 10/10/2015 17:09, Jeremy wrote:
>
> I want to use Qt3d in a situation that involves dynamic runtime 
> changes of geometric data on the application side.
>
> What is the best way to dynamically change a mesh for an entity?
>
> I'd rather do all this on the C++ side, but QMesh doesn't seem to 
> provide an API for changing the mesh data.
>
> I looked at some other examples of making a custom QAbstractMesh class 
> and QAbstractMeshFunctor. It looks like I could possibly make a custom 
> mesh type to do what I need but I have a question. If I keep a 
> reference to the QMeshDataPtr that I make from the functor, can I 
> simply modify the mesh data whenever I want and the entities that 
> reference it will update automatically?
>
> Thanks
> Jeremy
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


-- 
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151011/7566469b/attachment.html>


More information about the Interest mailing list