Re: Preserve IV coords

New Message Reply Date view Thread view Subject view Author view

Scott McMillan (mcmillan++at++cambridge.com)
Wed, 08 Jul 1998 09:57:17 -0400


Allan Schaffer wrote:
>
> On Jul 3, 10:32am, Roy Ruddle wrote:
> > By default, the Performer's .iv loader transforms coords from .iv space (Y
> > up) to PF space (Z up). Is there a function/attribute that can be
> > specified to tell Performer to load .iv files without transforming the
> > coords (it isn't listed as an attribute of pfdConverterMode() in
> > /usr/include/Performer/pfdb/pfiv.h)?
>
> Nope, sorry. The code that adds that transformation is
> unconditional. Good idea for an RFE though, I'll file it.
>
> Allan

Or if you can't wait you could build your own IV loader (the source is
in $(PFROOT)/usr/share/Performer/src/lib/libpfdb/libpfiv) by modifying
pfiv.C as follows:

1) Around line 595 remove the following:

    // Add in Inventor->Performer coordinate system transform
    // since pfFlatten() does not affect pfLights
    if (DoFlatten)
        mat.postRot(mat, 90.0f, 1, 0, 0);

2) Around line 2156 change

      mat.makeRot(90.0f, 1, 0, 0);

  to
      mat.makeIdent();

Step 2 is not the most efficient but it gives you the general idea.
Later, if you wanted to get fancy you add a option that
turns this on and off.

IMPORTANT: Please note that I have not actually tried this myself
so I cannot guarantees that it works properly. It is a good first
step though.

-- 
Scott McMillan                            mailto:mcmillan++at++cambridge.com
Cambridge Research Associates             http://www.cambridge.com
1430 Spring Hill Road, Ste. 200           Voice: (703) 790-0505 x7235
McLean, VA 22102                          Fax:   (703) 790-0370
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:41 PDT

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