From: EXT-Morgan, Dennis (dennis.morgan++at++boeing.com)
Date: 10/08/2002 06:34:18
REMOVE
-----Original Message-----
From: info-performer++at++sgi.com [mailto:info-performer++at++sgi.com]
Sent: Tuesday, October 08, 2002 4:00 AM
To: allan++at++holodeck.engr.sgi.com
Subject: info-performer Oct 07 2002
Welcome to the info-performer mailing list DIGEST for October 07 2002
List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
Send Submissions to: info-performer++at++sgi.com
Add/Remove requests: info-performer-request++at++sgi.com
Message Subjects:
RE: [info-performer] May I control FLT file with hierarchy struct u
Re: [info-performer] May I control FLT file with hierarchy structure
[info-performer] repeatedly running Performer apps
Re: [info-performer] repeatedly running Performer apps
[info-performer] LOD fading
Re: [info-performer] May I control FLT file with hierarchy structure
****************************************************************************
**
From: Ong Tze Lin <tzelin++at++sgi.com>
Date: Mon, 7 Oct 2002 15:12:24 +0800
Subject: RE: [info-performer] May I control FLT file with hierarchy struct
ure
Hi Archer,
Load the 3D model with
node = pfdLoadFile( "..." );
Search for the DOF bead/ pfDCS node. You MUST know the name of the node in
this case:
pfDCS * wheels;
wheels = (pfDCS*) node->find( "name", pfDCS::getClassType() );
Once you check that you have been returned a valid pointer, you can apply
pfDCS calls to modify the rotation, translation, scale.
wheels->makeRot( ... );
-=-=-
You can also install a pre-node app callback (with node->setTravFuncs() ) to
do the same, rather than controlling it from your main loop.
Finally, you can write a pfuTraverser function to do the search.
Take note of the current transformation matrix when doing the transforms,
and the centre point of the part you intend to transform- if not you may not
get the results you were hoping for.
Cheers,
Tze Lin
-----Original Message-----
From: ChiaSheng [mailto:ccsheng1201++at++yahoo.com.tw]
Sent: Thursday, October 03, 2002 4:50 PM
To: MLM Veraart
Cc: Performer Mailing List
Subject: Re: [info-performer] May I control FLT file with hierarchy
structure
Hi, Mario
Um....I try to find the "README" file of the flight loader, but I didn't
understand it.
And how can I get the pointer of the DOF Node to steer the wheels?
Can you tell me more about the loader , please.
I load the flight file by "pfdLoadFile( filename )".
File format is .flt and .pfb!!
Best Regards,
Archer Chen
----- Original Message -----
From: "MLM Veraart" < veraart++at++fel.tno.nl <mailto:veraart++at++fel.tno.nl> >
To: "(Archer Chen)" < archerc++at++hitrontech.com <mailto:archerc++at++hitrontech.com>
>
Cc: "Performer Mailing List" < info-performer++at++sgi.com
<mailto:info-performer++at++sgi.com> >
Sent: Tuesday, October 01, 2002 9:24 PM
Subject: Re: [info-performer] May I control FLT file with hierarchy
structure
You have to give all the wheels in the flight file a DOF (Degree Of
Freedom). Some wheels can rotate around two axis, steering wheel, the other
around one axis.
In your flight loader callback process the DOF information, see README file
of the flight loader.
At run time: adjust the rotation of the wheels according to the steering
position and adjust the
pfDCS car rotation according to its orientation on the road.
Mario
****************************************************************************
**
From: "ChiaSheng" <ccsheng1201++at++yahoo.com.tw>
Date: Mon, 7 Oct 2002 15:50:59 +0800
Subject: Re: [info-performer] May I control FLT file with hierarchy
structure
Hello ,Tez Lin ,
It's long time no see. How are you?
I had fix the problem by :
carNode =3D pfdLoadFile("car.flt");
tireNode =3D (pfNode*) pfFindNode(carNode, "tire1",
pfGetGroupClassType());
pfRemoveChild(carNode, tireNode);
tire =3D pfNewDCS();
car =3D pfNewDCS();
pfAddChild(tire, tireGrp);
pfAddChild(car, carNode);
pfAddChild(car, tire);
pfAddChild(scene, car);
Then I change the tire DCS, so that I can rotate it alone.
It work well , and any wrong about it esle ??
I will put the code to node pre-app and try it again.
Thanks.
Cheers,
Archer Chen
----- Original Message -----
From: "Ong Tze Lin" <tzelin++at++sgi.com>
To: "'ChiaSheng'" <ccsheng1201++at++yahoo.com.tw>
Cc: "Performer Mailing List" <info-performer++at++sgi.com>
Sent: Monday, October 07, 2002 3:12 PM
Subject: RE: [info-performer] May I control FLT file with hierarchy
structure
> Hi Archer,
>
> Load the 3D model with
>
> node =3D pfdLoadFile( "..." );
>
> Search for the DOF bead/ pfDCS node. You MUST know the name of the nod=
e
in
> this case:
>
> pfDCS * wheels;
> wheels =3D (pfDCS*) node->find( "name", pfDCS::getClassType() );
>
> Once you check that you have been returned a valid pointer, you can app=
ly
> pfDCS calls to modify the rotation, translation, scale.
>
> wheels->makeRot( ... );
>
>
> -=3D-=3D-
>
> You can also install a pre-node app callback (with node->setTravFuncs()=
)
to
> do the same, rather than controlling it from your main loop.
>
> Finally, you can write a pfuTraverser function to do the search.
>
> Take note of the current transformation matrix when doing the transform=
s,
> and the centre point of the part you intend to transform- if not you ma=
y
not
> get the results you were hoping for.
>
>
>
> Cheers,
> Tze Lin
>
>
-----------------------------------------------------------------
< =A8C=A4=D1=B3=A3 Yahoo!=A9_=BC=AF > www.yahoo.com.tw
****************************************************************************
**
From: Rob Body <r.body++at++hrwallingford.co.uk>
Date: Mon, 7 Oct 2002 12:20:54 +0100
Subject: [info-performer] repeatedly running Performer apps
Hi pfFriends,
I have an application running under Linux, using RedHat 7.2 and Performer
2.5.1 on a pc, that is started via the keyboard from the shell. Data is
passed the app via a LAN and it runs until the data received is an end app
block of data. The problem I have is that I want to be able to loop back
and restart automatically without having to come out of the app each time
and restart it from the shell. The app runs fine the first time, but the
second time through the data is received properly but the graphics window is
not draw and on the third run through I get a segmentation fault after my
data is read in. I guess I am running out of memory ?
The pseudo code for my app is :
restarted = false
setup and open socket
while (stop != 1)
if not restarted paint
if not restarted InitSharedMem
if not restarted pfuInit
if not restarted InitConfig
if not restarted pfConfig
if not restarted tell Process Manager to configure the system
if not restarted pfiInit
receive data file names
InitScene
InitPipe
pfFrame
InitGUI
InitChannel
Wait for go ahead
While (go == 1)
pfSync
Get Data
PreFrame
pfFrame
PostFrame
end while
restarted = true
pfuFreeAll
pfuExitInput
pfuExitUtil
end while
pfExit
I am not sure what has to be re-initialised and what doesn't in order to
free up memory, clear data file names and correctly set up the graphics
window in order for it to start drawing properly again.
Any help will be appreciated.
Thanks
Rob
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Body
Simulator Manager
HR Mardyn
HR Wallingford
Howbery Park
Wallingford
Oxon
OX10 8BA
Tel +44 (0) 1491 822327
Fax +44 (0) 1491 832233
E-mail r.body++at++hrwallingford.co.uk <mailto:r.body++at++hrwallingford.co.uk>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
HR Wallingford uses Faxes and Emails for confidential and
legally privileged business communications. They do not of
themselves create legal commitments. Disclosure to parties
other than addressees requires our specific consent. We are
not liable for unauthorised disclosures nor reliance upon
them. If you have received this message in error please
advise us immediately and destroy all copies of it.
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
****************************************************************************
**
From: Brian Furtaw <brian++at++sgi.com>
Date: Mon, 07 Oct 2002 12:16:57 -0400
Subject: Re: [info-performer] repeatedly running Performer apps
Rob, you can run /usr/share/Performer/bin/rmsem between runs to make
sure Performer memory is clear. What you are describing though sounds to
me like your data socket is not getting initialized correctly. You
should be able to confirm this in the debugger by attaching to the APP
and seeing if you are blocked on a socket read. ltrace could also show
you this.
Brian
Rob Body wrote:
>
> Hi pfFriends,
>
> I have an application running under Linux, using RedHat 7.2 and Performer
> 2.5.1 on a pc, that is started via the keyboard from the shell. Data is
> passed the app via a LAN and it runs until the data received is an end app
> block of data. The problem I have is that I want to be able to loop back
> and restart automatically without having to come out of the app each time
> and restart it from the shell. The app runs fine the first time, but the
> second time through the data is received properly but the graphics window
is
> not draw and on the third run through I get a segmentation fault after my
> data is read in. I guess I am running out of memory ?
>
> The pseudo code for my app is :
>
> restarted = false
>
> setup and open socket
>
> while (stop != 1)
> if not restarted paint
> if not restarted InitSharedMem
> if not restarted pfuInit
> if not restarted InitConfig
> if not restarted pfConfig
> if not restarted tell Process Manager to configure the system
> if not restarted pfiInit
>
> receive data file names
> InitScene
> InitPipe
> pfFrame
> InitGUI
> InitChannel
>
> Wait for go ahead
>
> While (go == 1)
> pfSync
> Get Data
> PreFrame
> pfFrame
> PostFrame
> end while
>
> restarted = true
>
> pfuFreeAll
> pfuExitInput
> pfuExitUtil
>
> end while
>
> pfExit
>
> I am not sure what has to be re-initialised and what doesn't in order to
> free up memory, clear data file names and correctly set up the graphics
> window in order for it to start drawing properly again.
>
> Any help will be appreciated.
>
> Thanks
>
> Rob
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Rob Body
> Simulator Manager
>
> HR Mardyn
> HR Wallingford
> Howbery Park
> Wallingford
> Oxon
> OX10 8BA
>
> Tel +44 (0) 1491 822327
> Fax +44 (0) 1491 832233
>
> E-mail r.body++at++hrwallingford.co.uk <mailto:r.body++at++hrwallingford.co.uk>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
> HR Wallingford uses Faxes and Emails for confidential and
> legally privileged business communications. They do not of
> themselves create legal commitments. Disclosure to parties
> other than addressees requires our specific consent. We are
> not liable for unauthorised disclosures nor reliance upon
> them. If you have received this message in error please
> advise us immediately and destroy all copies of it.
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
--
----oOOo---- ----oOOo---- ----oOOo---- ----oOOo----
Brian Furtaw (brian++at++sgi.com) Mailstop: DSE-2612
Graphics Guru Office:(301)572-3293 Fax: (253)323-8182
12200-G Plum Orchard Drive OpenGL/Performer/OpenInventor/ImageVision
Silver Spring, Maryland 20904 Volumizer/Optimizer/React/PCI Device
Drivers
****************************************************************************
**
From: John Breedlove <jbreedlo++at++cs.ucf.edu>
Date: Mon, 07 Oct 2002 17:08:27 -0400
Subject: [info-performer] LOD fading
Hi all,
I'm not able to get LOD fading to work at all, and I was wondering if
anyone had any pointers for me. From what the man pages tell me, I
should just be able to use pfChanLODAttr(chan, PFLOD_FADE, 10), and that
should set all the transition distances of my LOD nodes to 10 units.
However, I don't get any fading at all with this. I'm using Performer
on Linux and have a Geforce4 Ti4600 card (if any of that makes a
difference).
Thanks!
John
****************************************************************************
**
From: =?big5?B?s6+uYaXNKEFyY2hlciBDaGVuKQ==?= <archerc++at++hitrontech.com>
Date: Tue, 8 Oct 2002 11:36:44 +0800
Subject: Re: [info-performer] May I control FLT file with hierarchy
structure
Hi Tze Lin,
I try to do that but I still got some problem .
I find the node by pfFindNode() to get the node I need and
rotate the node in pre-node app function.
But I can see the car in Scene without rotation.
I consider that I lose something about it. Can you give me
some suggestion?
This is my code: (using C )
int
preAppFunc(pfTraverser *trav, void *data)
{
static float angle2 = 0.0f;
pfDCS *tire_dcs;
angle2 += 0.1f;
if (angle2 > 360.0f)
angle2 = 0.0f;
tire_dcs = (pfDCS*)pfFindNode(pfGetTravNode(trav),
"tire",
pfGetGroupClassType());
pfDCSRot(tire_dcs, angle2*2, 0, 0);
return PFTRAV_CONT;
}
main()
{
.....
....
pfdConverterMode(".pfb", PFFLT_CLEAN, 0);
pfdConverterMode(".pfb", PFFLT_FLATTEN, 0);
shared->model.car_pmodel = pfdLoadFile("car.pfb");
pfdConverterMode(".pfb", PFFLT_CLEAN, 1);
pfdConverterMode(".pfb", PFFLT_FLATTEN, 1);
pfNodeTravFuncs(shared->model.car_pmodel, PFTRAV_APP, preAppFunc,
NULL);
shared->model.car_dcs = pfNewDCS();
pfAddChild(shared->model.car_dcs, shared->model.car_pmodel);
pfAddChild(shared->Scene, shared->model.car_dcs);
......
.....
}
Regards,
Archer Chen
----- Original Message -----
From: "Ong Tze Lin" <tzelin++at++sgi.com>
Hi Archer,
You only need to remove the tire from the car once, in your main function.
Then, you can attach the movement code, eg some variable angle of rotation
as a function of how the user turns the steering wheel, to the tires.
-=-=-
Cheers,
Tze Lin
****************************************************************************
**
This archive was generated by hypermail 2b29 : Tue Oct 08 2002 - 06:34:28 PDT