Re: Asymmetric Frustrum

New Message Reply Date view Thread view Subject view Author view

Anita Kishore (kishore++at++triavest.com)
Wed, 2 Jul 1997 10:15:17 -0700


On Jul 1, 2:35pm, Hendrik-Jan van Veen wrote:
> Subject: Asymmetric Frustrum
> We run Performer 2.1 on a Onyx2 IR and need to use asymmetric
> frustrums. Man pfChannel seems to suggest to use
> pfMakePerspChan(pfChannel* chan, float left, float right, float bottom,
> float top). I couldn't figure out what coordinate system to use for
> left,right,top and bottom though. The example in the manpage seem to
> suggest fractions of the total FOV but how to set this? Calling
> pfChanFOV didn't seem to make a difference.

If you mean how to find the four sides of the frustum, here is how:

    pfGetChanNearFar(chan, &near, &far);
    pfChanAspect(chan, PFFRUST_CALC_VERT, aspectRatio);
    x = near * pfTan(camera->horizFOV/2.0f);
    z = x / pfGetChanAspect(chan);
    pfMakePerspChan(chan, -x, x, -z, z);

The Performer book has explainations for the relationship between aspect
ratio and the sides of the frustum. The above code is based on that.

Hope this helps

-anita
kishore++at++triavest.com

-- 
Anita Kishore
=======================================================================
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:55:34 PDT

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