Mike Weiblen (mew++at++paradigmsim.com)
Fri, 15 May 1998 16:49:14 -0500
If I had to start from scratch, the approach I would use is to:
1) create a Tcl/Tk interpreter in the Performer app,
2) create Tcl command bindings for the functionality to be invoked at
runtime,
3) register those commands with the interpreter,
4) during the sim loop, invoke Tcl_DoOneEvent() til all events handled.
This results in a Performer app that can now process commands sent to it
using the Tcl/Tk "send" command. Tcl_DoOneEvent() will take care of the
event handling, and invoking the registered Tcl commands.
But no need to start from scratch: Paradigm has a vgGift called "pfTcl",
which does those steps, and includes a set of Tcl bindings for nearly
all the Performer API. So by adding a few lines to a Performer app, you
have access to the Performer API at runtime. pfTcl is part of the vgTcl
package, which you can get from
ftp://ftp.paradigmsim.com/pub/outgoing/vggifts/vgtcl/vgtcl_OMEGA1.tardist
Then see /usr/sgitcl/PSI/include/pftcltk.h for the functions
pfInitTclTk() and pfUpdateTclTk().
Hope this helps.
Cheers
-- mew
Jose Luis Garcia Nava wrote:
>
> Hi pfPeople,
>
> we are trying to develop a simple Performer application that reads
> commands from a Tcl/Tk application.
>
> At this moment, the Tcl/Tk program reads input data from a serial port
> device, then translates this data into alpha-numeric strings and send
> these strings to a c-based program (already started) that generates and
> plays sound files.
>
> I am sure we can send those alpha-numeric strings also to a Performer
> application to modify visual appearence of certain 3D models, but I do
> not know how to proceed. I think I need to use pfutil event handling
> features to get the strings into Performer, then use this data to modify
> DCS already associated to my 3D models. As you can see, there is a lot
> of work from this generic (and maybe wrong) idea to programming stage.
> Any advise on how to retrieve strings from memory by pfutil will be
> appreciated.
>
> Thanks,
>
> Jose Luis.
>
> --
> Jose Luis Garcia Nava
> Jefe del Taller de Realidad Virtual
> Centro Multimedia, CNA.
> Tel. +52(5)420-4503 Fax. +52(5)420-4456
> E-mail: garcianv++at++correo.cnart.mx
--
Mike Weiblen talkto:972-960-2301 x292
PARADIGM Simulation, Inc. faxto:972-960-9049
14900 Landmark, Suite 400 mailto:mew++at++paradigmsim.com
Dallas TX 75240 http://www.paradigmsim.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:24 PDT