Re: Inventor file format loader

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 05/24/2000 13:13:45


Allan Schaffer wrote:
>
> On May 24, 3:41pm, Dickinson, John wrote:
> > A bunch of us have noted that inventor files we load into scenes are often,
> > if not always, rotated 90 degrees.
> [...]
> > However documentation on the loaders is sparse (read almost non-existent)
> > and leaves me wondering if the loader for inventor files can be "tweaked".
>
> Definitely. Source code for the Inventor loader is shipped in
> the performer_dev.src.loader subsystem in Performer 2.2; look to
> /usr/share/Performer/src/lib/libpfdb/libpfiv
>
> > Anyone had similar experience with inventor files being rotated while
> > loading or tweaked the loader using this or other methods?
>
> This (the rotation) is intentional. Inventor has a Y-up world
> coordinate system, whereas Performer's is Z-up. So when loading
> inventor files we give it a 90 degree rotation about the X axis so
> that something modelled "upright" in inventor will appear "upright"
> in Performer. See line ~2156 of pfiv.C:
>
> // 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);

unless this scene is flattened (and it probably is) the object space
coords will remain in inventor axes and you should be able to work in
Inventor coordinates at least in the object space below this SCS. You
might find that useful. If this is not the case then remove pfFlatten
calls on or above the SCS.

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed May 24 2000 - 13:14:25 PDT

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