[fluxus] interactivity issues

Dave Griffiths dave at pawfal.org
Mon Jul 17 05:53:30 PDT 2006


> nik gaffney wrote:
>>>> the example script works the other way round, checks if the mouse is
>>>> over
>>>> an object and only does something if it is.
>>> Mmm, but this only works for trivial "somethings to do" - it's hard to
>>> do anything complex if you can't find (by comparison operations) which
>>> 'concept' in the scheme world the object you clicked on corresponds to.
>>
>> hmmm.. how about if the trivial something was to check an id (stored as
>> a number
>> in an alist, when the 'actor' is created for example) which if
>> sucessful, calls
>> a single function, using the id.
>
> I'm not sure I follow - how can you look up in an alist when
> eq/eqv/equal are not defined on the primitives?

I need to do some research if a primitive-eq is enough for assq, and if I
need to implement eqv and equal (which will be slow as they'll have to do
a deep compare against every vertex, and won't be much use afaict)

To be honest I'm tempted to revert it to the old system, where primitives
were just represented by exact id numbers, it would make all this a lot
simpler again. I haven't tried this sort of thing since doing that :)

> But!  Maybe I can use a pdata float as a temporary workaround?

Ugh! but yep, would work :) as would comparing world space transforms
(double ugh!)

What I would do is implement your actors as objects which contain
primitives and encapsulate the part that does the id checking using
pdata/transforms so you can swap it with something saner later on.

cheers,

dave




More information about the Fluxus mailing list