Qt3D - Dynamic Mesh
-
Hi! I have a few questions about Qt3D...
For example, i have cylindrical mesh. Can i without re-creating QBuffer with all data and appending QAttribute make next:- Change x,y,z coordinates of few vertices of mesh?
- Add or Remove few vertices?
Or, if i need change mesh vertices number or vertices coords, i sheuld to re-create all mesh?
-
Hi,
I assume its possible to do this as you have access to the QBuffer data via thebuffer()
function. You will have to know the internal structure, of course, and adapt the QAttribute members (number of vertices etc.) accordingly afterwards, then maybe even call some update routine on the Qt3DWindow as there was some doubt lately about it being done automatically when the data buffers change.On the other hand, I assume the functor in the cylindrical and other mesh examples runs in another thread (as e.g. I was not allowed to update GUI objects from within the functor), so you should ask yourself whether you really need the additional complexity to edit the buffers by yourself.
-Michael.