Re: Instancing geometry

New Message Reply Date view Thread view Subject view Author view

Andy Shein (ashein++at++orac.boston.sgi.com)
Mon, 7 Jun 1999 14:48:20 -0400


Hello Andrew
   There should be a readme file with the MultiGen loader
that gives one way to solve your problem.
/usr/share/Performer/src/lin/libpfdb/libpfflt/README.FLT.R15_3
   In you loader callback you need to save the
DOF info. then when you want to move something

   work_mat.makeRot( theta_port*TODEG, 1.0, 0.0, 0.0 );
   work_mat.preMult( connect_dof->putmat );
   work_mat.postMult( connect_dof->putinvmat );
   connect_dcs->setMat( work_mat );

or
   work_mat.makeTrans( 0.0, y_piston_port, 0.0 );
   piston_port_dcs->setMat( work_mat );

or
   workCoord.xyz.set( 0.0, 0.0, 0.0 );
   workCoord.hpr.set( 0.0, value, 0.0 );
   workMat.makeCoord( &workCoord );
   workMat.preMult( dof->putmat );
   workMat.postMult( dof->putinvmat );
   dcs->setMat( workMat );

If you do it this way, just creat the 4 DOF beads in
multigen and then instance the tire under them.
                        Andy

On Jun 7, 5:37pm, Andrew Bailey wrote:
> Subject: Instancing geometry
>
> Hi,
>
> I have modelled a car in MultiGen and have nearly got the wheels
> rotating. Originally the wheels were all just raw geometry, so the
> centre of rotation was not at the centre of each wheel, hence when the
> DCS for the wheels was altered the 4 wheels rotated about the origin,
> not about the wheel centre (generating some very humorous results!).
>
> What I would like to do is model the wheels as multiple instances of a
> wheel modelled at the origin, so that I can just apply the rotation to
> that wheel and the instances will all rotate as well. This should
> eliminate the need to move the centre of rotation for the DCS each time.
> I do not think this is possible though. Can the loader for MultiGen
> flight files correctly interpret instanced beads?
>
> I have tried this approach, by having one wheel at the centre of the car
> model rotating accurately, however the instances are stationary, or
> still rotating about the wrong point. I do not really want to have to
> move the centre of rotation for each wheel.
>
> Any ideas?
> thanks,
> Andrew
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Andrew Bailey

-- 
Andrew Shein   SE Stout               email: ashein++at++boston.sgi.com
Silicon Graphics Inc.                 phone: (978) 562 - 4800
1 Cabot Road                            fax: (978) 562 - 4755
Hudson, MA 01749                      vmail: 59688

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Jun 07 1999 - 11:48:35 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.