We use a transaction system to force integrity of the scenegraph.  Basically
there is a single behavior with a wakeup elapsed frame 0.  This behavior
wakes up, recalculates the view, updates each major sub-system using the
frame time (particles, landscape, billboards, object movements).  It then
checks a queue of "transaction" objects.  A transaction object contains a
set of scene update objects which can make changes to the scenegraph.  So if
we are swapping an imposter with a model, we would do that in one atomic
transaction.

So if you make the updates from within a single behavior it will be done
within that frame and so will retain its coherancy.

Dave Yazel

-----Original Message-----
From: Roland Sarrazin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 10:50 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Synchronizing geometry updates


Hello,

I'm looking for an efficient way to synchronize geometry updates, that is, I
have some geometries that I want to update, but I would like that the user
doesn't see an update after the other, but only sees the final result.

I have tried to stop the rendering through
universe.getCanvas().stopRenderer(), to achieve my geometry update and to
start the rendering again with startRenderer(), but it seems that Java3D
handles the geometry updates requests (that I do through
Shape3D.setGeometry() since it is in my examples much faster to rebuild the
geometry each time than to update the vertex' coordinates with the
capability ALLOW_COORDINATES_WRITE enabled - would geometry by reference be
faster by the way?) asynchronously.

Do you see a way to avoid those ugly progressive geometry updates? Something
like a transaction that you build (the various updates) and finally commit?
Mmmh, might have done too much database programming...

Thanks for any hint or suggestion!

Roland

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to