realbasic-nug
[Top] [All Lists]

Re: vertex wrestling in RB3D

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: vertex wrestling in RB3D
From: Fargo Holiday <fargo at rpgportland dot com>
Date: Sat, 30 Jun 2007 01:12:10 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20070630062238 dot 0BE1077503F at mail dot verex dot com>

joe at strout dot net wrote:
> On Jun 30, 2007, at 06:08 UTC, Fargo Holiday wrote:
>
>   
>> I've been trying to puzzle out how to edit vertex positions.
>> Vectorlists  appear to be what I'm looking for, but so far no joy.
>> Any of you guys  happen to have, or know about, a truly barebones
>> example of vertex  position manipulation?
>>     
>
> I've used it a number of times, but I don't know that I have a
> bare-bones example.  It's pretty straightforward, though -- start with
> a Trimesh, then access the VertexPositions and modify them as needed. 
> Where are you stuck?
>
> Best,
> - Joe
>
> --
> Joe Strout -- joe at strout dot net
> Strout Custom Solutions, LLC
>
>
> _______________________________________________
>   
You know, I just tried it again with a trimesh, and got it to work. 
Apparently I've just been retarded the rest of the day, since I honestly 
don't know what I was doing wrong.

Onward! So, I decided to try my hand and doing this to a model loaded 
>from a 3dmf. Model is loaded, all seems fine, and I have a button with 
this in it-
  dim myV As new VectorList
  dim v3d As new Vector3D
 
  myV = tobj3d.Trimesh(0).VertexPositions
 
  v3d = myV.GetVector(0)
  v3d.Y = v3d.Y + 20
  myV.SetVector(0, v3d)
 
  Rb3DSpace1.Update

And, for reasons that escape me, when I click the button I receive and 
outofbounds exception, seemingly from v3d = myV.GetVector(0).

Any thoughts on that? Much like the simpler trimesh bit, it's probably 
something simple escaping me.

Thanks,
Fargo
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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