Re: [Plib-users] Asymmetric view frustums
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2005-02-20 13:54:56
|
Curtis L. Olson wrote: > I have an application where I need to setup an asymmetric view frustum. > I can't find my Red Book tonight (maybe left at work?) but I'm not sure > it would be much help anyway? Is there a reasonably easy way to setup > asymetric view frustums in ssg? Yes, there is a member function of ssgContext called 'setFrustum' (and a convenience function: ssgSetFrustum that calls it on the current context). That takes the left, right, bottom, top, near and far plane distances as parameters. The meaning of these is exactly as for OpenGL's glOrtho and glFrustum calls. Assuming you need perspective, this means: left, right Specify the coordinates for the left and right vertical clipping planes. bottom, top Specify the coordinates for the bottom and top horizontal clipping planes. near_val, far_val Specify the distances to the near and far depth clipping planes. Both distances must be positive. (left, bottom, -near_val) and (right, top, -near_val) specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, assuming that the eye is located at (0, 0, 0). -far_val specifies the location of the far clipping plane. Both near_val and far_val must be positive. ----------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |