realbasic-games
[Top] [All Lists]

Re: animating trimeshs efficently

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: animating trimeshs efficently
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Thu, 28 Jul 2005 13:14:38 -0600
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <DAB49B32-D2C6-43A0-9E72-83C95F6A235F at divergentmedia dot com>
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.

Best,
- Joe

--
Joe Strout                          REAL Software, Inc.

Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>