From: ChiaSheng (ccsheng1201++at++yahoo.com.tw)
Date: 10/07/2002 00:50:59
Hello ,Tez Lin ,
It's long time no see. How are you?
I had fix the problem by :
carNode = pfdLoadFile("car.flt");
tireNode = (pfNode*) pfFindNode(carNode, "tire1",
pfGetGroupClassType());
pfRemoveChild(carNode, tireNode);
tire = pfNewDCS();
car = 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 = 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
>
>
-----------------------------------------------------------------
< ¨C¤Ñ³£ Yahoo!©_¼¯ > www.yahoo.com.tw
This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 00:57:30 PDT