Re: does pfGetTravMat matrix include projection?

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Tue, 21 Feb 95 10:28:14 PST


>
> On Feb 17, 1:51am, David Luebke wrote:
> > Does the matrix returned by pfGetTravMat include the perspective
> > transform or not? My problem is this: I have a bunch of points in
> > a pre-cull callback that I want to transform into screenspace. I
> > was planning to use pfGetTravMat to grab the current matrix and pump
> > the vertices through with pfXformPt3, when I realized that the matrix
> > probably would not include the projection into screenspace. Comments
> > or suggestions? Thanks,
>
> The matrix returned by pfGetTravMat is the model transform matrix, so
> no, the projection matrix (containing your perspective transform) is
> not included.
>
> Offhand this sounds fairly difficult to do since I don't think the
> CULL process has a concept of the actual projection matrix or of screen
> pixels.
>
> I don't have the man pages readily available (gasp) but perhaps there
> is a way to divine the proper projection matrix given the values
> you've supplied to define a pfChannel, along with the perspective
> matrix definition in the back of the GL Programming Guide. Sounds
> gross, hopefully someone will mention a better way. :)
>
> This would be a piece of cake from the draw process, where you could
> just call mmode(MPROJECTION); getmatrix(foo); mmode(MVIEWING).
>
> What are you trying to do?
>
> Allan
>
> --
> Allan Schaffer
> Silicon Graphics
> aschaffe++at++sgi.com
> http://reality.sgi.com/employees/aschaffe
>

         
        Currently, you can query the CULLing channel through
pfGetTravChan and call pfGetFrustNear(chan) to get the projection
plane of the channel. In 2.0 we hope to implement pfGetFrustMat
so you can get the projection matrix of a pfFrustum or pfChannel.


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:50:59 PDT

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