update node #1300
-
Hi Robert i have problem to update Nodes. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This was recently discussed in #1298 . I learned, that the preferred way is not to delete and recreate, but instead to insert a MatrixTransform above the Builder generated box in the scenegraph. You can then update the I also learned that in order to delete the node, you have to put it into a queue that survives at least three frames. Make sure to turn on |
Beta Was this translation helpful? Give feedback.
-
Thank you, I was able to use the MatrixTransform, but there are two other problems. |
Beta Was this translation helpful? Give feedback.
-
The way to move locate objects on the earth ellipsoid in to use vsg::EllipsoidModel. The method specifically written for the task of positioning objects is: /// latitude and longitude in degrees, altitude in metres
dmat4 computeLocalToWorldTransform(const dvec3& lla) const; You can use this to set the MatrixTransform::matrix value, and can update this during the update phase of the frame loop. There are several vsgExamples that use this method to place objects on the ellipsoid so have a search for the use of this method. |
Beta Was this translation helpful? Give feedback.
-
thanks my problem is solved but is there a document to describe VSG methods else examples? |
Beta Was this translation helpful? Give feedback.
-
The VulkanSceneGraph Tuttoiral online book is not complete, but work is progress is here: |
Beta Was this translation helpful? Give feedback.
This was recently discussed in #1298 .
I learned, that the preferred way is not to delete and recreate, but instead to insert a MatrixTransform above the Builder generated box in the scenegraph. You can then update the
matrix
attribute of theMatrixTransform
to move the box from one place to another, without the need to delete it.I also learned that in order to delete the node, you have to put it into a queue that survives at least three frames.
Make sure to turn on
windowTraits->debugLayer=true;
to see any vulkan errors.