Re: Inventor loader messes up indexed linesets

New Message Reply Date view Thread view Subject view Author view

From: Bryan Housel (bryan++at++openworlds.com)
Date: 02/13/2001 08:45:06


> > One of our old problem was maybe the same as your:
> > in the loader (Performer/src/lib/libpfdb/libpfiv/pfiv.C) a rotation is
> > made which has for me NO SENSE.
> > // Transform from GL/Inventor's Y-up coordinate system to Performer's
> > Z-up
> > mat.makeRot(90.0f, 1, 0, 0);
> > pfRoot = new pfSCS(mat);
>
> in forward(y), up(z) and right(x) :), How the axes in an inventor
> file will be interpreted might just be a convention. So maybe there
> is no error at all? Well that was my explanation to give me sleep
> back...

You're right, it's not an error.. Our VRML loader does the same thing
(vrml and iv use the same coordinate system).. Here's the code to do it,
along with my lovely comment on why..

   // this matrix performs a 90 degree rotation about the
   // x axis, because VRML axes are different than Performer..
   //
   // z y
   // Performer: y | VRML: -z |
   // \|__x \|__x

   pfMatrix TR;
   TR.makeRot(90.0f, 1, 0, 0);
   topSceneGraph = new pfSCS(TR);
   topSceneGraph->setName("VRML Scene");

If you didn't do that, any vrml or iv scene that you load into Performer
would end up turned sideways..

Bryan

-- 
OpenWorlds VRML C++ toolkit                 http://www.openworlds.com
Visit the OpenWorlds Booth at the Web3D Conference in Paderborn, Germany


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Feb 13 2001 - 08:59:27 PST

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