comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: objects in loop
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: objects in loop [message #23553 is a reply to message #23550] Wed, 31 January 2001 09:55 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I have not quite figured our why do you have to *destroy* the objects.
Why not place them into an OBJARR, save it and use Setproperty, pos=***
to simply move the objects to new positions, then re-draw the view?
Destroying works, too, but by moving them instead you'd save
destruction-creation overhead. Besides, ORB is a subclass of IDLgrMODEL,
so it has a ton of useful parameters that you can alter instead of re-creating.

Cheers,
Pavel

Murray Shearer wrote:
>
> I want to insert a bunch of spheres to represent instrument locations
> into my model. At the moment I have something like:
>
> for p=0,a do begin
> ip = OBJ_NEW('orb',pos=[x(p), y(p), z(p)])
> model -> ADD, ip
> endfor
>
> Where x, y and z are instrument coords.
>
> This did work fine (although I guess it is not technically correct) I
> could see all my instruments.
>
> The problem is this bit of code is part of a program for creating
> animations of data. When I want to change the instrument location I
> destroy the model and recreate from scratch, which also works (for the
> first couple of animations at least). However after a few loops IDL
> turns into a memory gobbling monster, windows has a whine about running
> out of memory and promptly collapses into a gibbering heap (this may be
> because I am running 5.3 in Win2000?).
>
> I think the solution might be to reuse the model after destroying only
> the spheres that represent instrument location (since that is all I
> really want to change). However because of the way I created the
> spheres I can�t destroy them.
>
> My question is therefore how do I create my spheres so that they are
> all one object or automatically generate them with individual names?
>
> Ps. I used to use mesh_obj to create the spheres but thanks to a recent
> posting I now use orb, which is much neater!
>
> Sent via Deja.com
> http://www.deja.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fontifying large buffers in idlwave?
Next Topic: Re: Fontifying large buffers in idlwave?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:53:05 PDT 2025

Total time taken to generate the page: 0.63882 seconds