On Jul 28, 2005, at 2:14 PM, Joseph J. Strout wrote:
At 1:51 PM -0500 7/28/05, Mike Woodworth wrote:
quesa wrappers i build the first frame as a trimesh3d. my
question is, for the next frame - the first update to this
existing trimesh, what is the most efficient way to do this?
Move the points.
the number of points and triangle to point configurations both
remain the same - only the position of those points changes. is
there a way to move those points without the overhead of
rebuilding everything from scratch?
Yes, absolutely. You just get a reference to the point array, and
poke your new values into it. This was illustrated in the article
"Real-Time Mesh Deformation" in RB Developer issue 2.1, <http://
www.rbdeveloper.com/browse/2.1/2110/>.
In the future, it may even be possible to do this without any
declares at all, but for now you'll need something like in that
article, or Frank's Quesa Wrappers.
interesting, i'll try this out, i see in franks wrappers the actual
declare is just passing in a ptr to the triangles and points, i guess
i assumed this data was being copied on creation to some internal
place (like the gpu) but it see now the model is maintained on my
side. so all i have to do is change the points directly in this
memoryblock and update the rb3d? no locking of the data is required
while i make changes? seems to easy.... :)
mike
--
Mike Woodworth
mike at divergentmedia dot com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|