animation data via socket

animation data via socket

Post by Tom Impellus » Fri, 04 Dec 1998 04:00:00



Hello,

My object deforms based upon a calculation that runs
via a remote process.

I would like to have the object constantly modifying
its configuration.

I use:

        SoTimerSensor *si = new SoTimerSensor(TimerCallback, position);
        si->schedule();

And my TimerCallback() reads the data fine.

But this has always seemed to be a kludge to me...

In GLUT, there is a call to an idle function; but there is
no such function in Inventor.

Perhaps I am too enamoured of the fact that in GLUT, the name (idle
function) is so descriptive, that I know it does what I want it to
do; but with Inventor, I get the feeling that, considering the name --
TimerSensor -- that I am kludging something that really has another
purpose...

Thanks
Tom

 
 
 

animation data via socket

Post by Jonathan Li » Fri, 04 Dec 1998 04:00:00



> Hello,

> My object deforms based upon a calculation that runs
> via a remote process.

> I would like to have the object constantly modifying
> its configuration.

> I use:

>         SoTimerSensor *si = new SoTimerSensor(TimerCallback, position);
>         si->schedule();

> And my TimerCallback() reads the data fine.

> But this has always seemed to be a kludge to me...

> In GLUT, there is a call to an idle function; but there is
> no such function in Inventor.

> Perhaps I am too enamoured of the fact that in GLUT, the name (idle
> function) is so descriptive, that I know it does what I want it to
> do; but with Inventor, I get the feeling that, considering the name --
> TimerSensor -- that I am kludging something that really has another
> purpose...

> Thanks
> Tom

So you want to use SoIdleSensor( ) then (note that it only triggers once
unless you reschedule it).

                Jonathan Lim    Silicon Graphics, Inc.
                GPS Graphics      Mountain View,  CA

 
 
 

1. SoTimerSensor-> socket animation (PLEASE HELP)

Total exasperation!

OK!  Please help

I am trying to write an open inventor code that draws, say,
a sphere of a given radius.

The radius will be read from a UNIX socket, or file, or
even generated internally, by a function.

I am trying to find a way to make the scene redraw every time
data is read, and data is being read CONTINUSOUSLY

In other words, I would like to call a function fxn() that
sets a global variable, say, size, to be used in the scaleing
of an image.

The only tool I can see of any use is SoTimerSenso, but that one
creates a callback that is called every 1/30 of a second, so
in my mind, it is NOT a process that is running in the background
behind Xtmainloop.

It seems sill that there is no node that does nothing but loop over:
1) calls a function to set variables (whether from file, socket, etc.)
2) redraws the scene.

I see rotor objects, translation objects, but those do not
allow me to plot a trajectory.

Other objects allow me to calcualte a trajectory, but then I lose
the ablility to continuosly call that function in the background.

OpenGL's GLUT library has this option:

glutIdleFunc(tick);

where tick is continuosly called in the background.

For example, look at example 17-3 in the text.

I would like to render this way:

                SbViewportRegion myViewport(WINWIDTH, WINHEIGHT);
                SoGLRenderAction myRenderAction(myViewport);
                myRenderAction.apply(root);
                glXSwapBuffers(display, window);
                myRenderAction.apply(root);
                SONODEFOREVER(myFunction());
                while(1)

something like that?

I look at the SoCalculator, and can envision a way I can kludge this
to make it work, but what I am trying to do seems so basic that I must
be missing something.

Please advise.

Tom

2. Distinct white lines.

3. 3D data set -> graphical object (via triangulation)

4. Drop algorithm 's complexity

5. read data from pgnuplot via pipe

6. question about low-end 24 bit color cards

7. to plot a binary-format data via gnuplot

8. Facial Animation stuff via ftp

9. Easy/Quick Character Animation via MIDI

10. Lightwave to Animation Master via dxf

11. Whats the funny looking socket on my 9600 ?