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

Home » Public Forums » archive » Re: Bug in IDLgrPolygon ?
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: Bug in IDLgrPolygon ? [message #33239 is a reply to message #33182] Sun, 15 December 2002 19:35 Go to previous message
Thomas Gutzler is currently offline  Thomas Gutzler
Messages: 44
Registered: November 2002
Member
Karl Schultz wrote:
>
> "Thomas Gutzler" <tgutzler@ee.uwa.edu.au> wrote in message
> news:3DF947BE.F454E7E@ee.uwa.edu.au...
>>
>> [..] Just move the 5 elements describing the
>> polygon I want not be shown to the end and put a -1 in front. But I
>> thought thats bad programming style, isn't it ?
>
> I'm not sure about style, but appending the "disabled" polygon and the -1 to
> the end of your polygon list is going to cause an alloc/free and a copy of
> the entire list.

Argh, you're right. I forgot that moving the elements to the end is fine
but they cannot be reenabled.

> If it were me, I'd think about just copying the disabled polygon out to
> another data structure, along with its starting index. Then, I zap the poly
> in the original list to zero. I copy the polygon back to the same place to
> reenable it.

I'm going to do this.

> One cool thing I thought of is that a negative value for a vertex count
> would mean skip over the (positive) number of vertices. That is, a -3 in a
> list would mean skip the next three elements. This would let you skip a
> polygon by just changing the sign in the count. -1 would still mean "end of
> list", since a polygon with 1 vertex isn't valid anyway. I don't know what
> the utility/confusion ratio would be here...

nice toy :)

thanks,
Tom
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Clean your PC properly - wk u10 i32dq3 87idq2iw71
Next Topic: Re: Serial I/O

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

Current Time: Wed Oct 08 16:52:13 PDT 2025

Total time taken to generate the page: 0.00400 seconds