From: Tomlinson, Gordon (GORDON.TOMLINSON++at++ca.com)
Date: 03/15/2002 15:21:55
Not need to do all that at all
You can find a switch using the Perfumer API quite easily no
need put a loader callback at all.
What you have to remember is the Open flight extends the limited
pfSwitch by creating masks, see Creator help on masks for switches.
So when you set which switch is active your setting the mask not
the child, a mask allows you to show more than one child at a time etc.
Search the MPI Vega forum for info on how to find switches, just do
a search on switch I posted code there last year
http://www.multigen-paradigm.com/cgi-bin/forumdisplay.cgi?action=topics&foru
m=Vega&number=2&DaysPrune=45&LastLogin=
Regards
Gordon.
_________________________________________________________________
Gordon Tomlinson
Development Manager
Urban Simulation Products.
MultiGen-Paradigm
"a Computer Associates Company"
Suite 200, 16415 Addison Road, Addison, TX 75001 USA
Tel: 972 380 9798 ext 309 Fax: 972 380 9468
Email: gordon.tomlinson++at++ca.com
-----Original Message-----
From: Andrew Preece [mailto:apreece++at++sgi.com]
Sent: Wednesday, March 13, 2002 6:13 AM
To: 'Ludwig, Thomas'; 'info-performer++at++sgi.com'
Subject: RE: pfSwitch and OpenFlight
Hi,
In order to change a switch you need to be able to get reference to it. To
get a reference you need to customise the OpenFlight reader. Once you have
a pointer to the pfSwitch's in your loaded scene you should then be able to
make a pfswitch -> setVal() call to control the switch settings. Be warned
that you must set up the switch masks in the Switch beads in Creator in
order
for the Multigen OpenFlight reader to create the correct tree structure in
Performer.
Look at the document
/usr/share/Performer/src/lib/libpfdb/libpfflt/README.FLT.
This has some example code and documentation on customising the OpenFlight
reader.
Attached is some additional example code.
Regards,
Andy
-----Original Message-----
From: Ludwig, Thomas [mailto:Thomas.Ludwig++at++dlr.de]
Sent: 13 March 2002 8:34
To: 'info-performer++at++sgi.com'
Subject: pfSwitch and OpenFlight
Hi all,
We attempt to use switches in a *.flt database via pfSwitch and pfSwitchVal
(). But we cannot change the values. Has somebody experience with the use of
switches in an Open Flight file by Performer (maybe an example)?
many thanks
Thomas
German Aerospace Center
Institute of Flight Guidance
Pilot Assistance
Lilienthalplatz 7
38108 Braunschweig
Phone: +49-531-295-2934
Fax: +49-531-295-2550
-----------------------------------------------------------------------
List Archives, Info, FAQ: http://www.sgi.com/software/performer/
Open Development Project: http://oss.sgi.com/projects/performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Fri Mar 15 2002 - 15:23:10 PST