You also need to be aware of the fact that the node's bounding volume won't
be updated when you update the vertex array directly. You'll either need to
dirty the bounding volume explicitly ( triggering osg to automatically
recalculate the bounding volume), or you'll need to override the
updatebound method (something like that), and define the bounding volume
using your own methods.

If you're dealing with a large number of vertices then recalculating the
bounding volume can take a non-trivial amount of time. I've found it to be
much faster to explicitly set the bounding volume (using the override)
based on the knowledge of how you're changing the object.

Brian

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose. •
[email protected] wrote: -----

To: [email protected]
From: Emmett McQuinn <[email protected]>
Sent by: [email protected]
Date: 02/25/2009 05:31PM
Subject: [osg-users] Efficient Animated Deformable Meshes

Hello,

I'm trying to create an animated deformable mesh, and I have not found a
good way to do so. The most obvious way is to re-create the geometry for
each frame, but I would rather have just one geometry and alter the
underlying points for efficiency. I have attempted to change the vertices
(in a Vec3Array) that are used to create my geometry, but these changes
don't update to screen.

Each point on the mesh is transformed over time, and image of something
similar to what I am attempting to do can be viewed here:
http://web.ics.purdue.edu/~braile/edumod/waves/WaveDemo_files/image036.gif


Thanks,
Emmett McQuinn
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to