realbasic-games
[Top] [All Lists]

Re: Realtime editing of a trimesh from an object3D

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Realtime editing of a trimesh from an object3D
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Tue, 27 Sep 2005 08:15:27 -0600
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <43394272 dot 7040203 at optusnet dot com dot au>
At 11:00 PM +1000 9/27/05, Martin Dillon wrote:

I'm trying to move individual vertices within a trimesh that has been extracted from an object3D using the new RB2005r3 features. I can extract the trimesh ok, and change the position of individual vertices, but I can't re-assign my changes back to the object3D to show the new shape in RB3Dspace.

That's correct. Instead, you should add the Trimesh objects that you will be manipulating directly to the Rb3DSpace.Objects for rendering.

 RB3Dspace1.objects.Append Object1

...remove this line...

 //get the first trimesh in the model
 tm = new trimesh
 tm = Object1.Trimesh(0)

...and here, add instead:

  RB3Dspace1.objects.Append tm

Now you're all set to manipulate tm and see the changes in real-time. Look at how the "Trimesh Explorer" demo works for an example.

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>