Directly modifying the vertex coordinates in a buffer object

Hello Folks,

I have a situation where I am making changes to the vertex coordinates of a buffer geometry of a mesh object. After doing so, I make the following calls:

	thisGeometry.attributes.position.needsUpdate = true;
	thisGeometry.computeBoundingBox();
	thisGeometry.computeBoundingSphere();	

Please confirm that this is both necessary and correct.

Further, if the bounding box and sphere of this geometry are thus updated, does this change automatically propagate upward, all the way to the scene graph root?

Thanks much,

OLDMAN

If you update data in the position buffer attribute, then all three lines are required.

The first one ensures the updated buffer data are actually uploaded to the GPU. The second and third line recomputes the bounding volumes which is necessary when the extends of the geometry changes. That might be true when vertices are displaced.

Bounding volumes only exist on geometry level. If you update them like above, everything should work as expected.