NAME

glOrtho - multiply the current matrix with an orthographic matrix

C SPECIFICATION

void ggllOOrrtthhoo( GLdouble _l_e_f_t,
              GLdouble _r_i_g_h_t,
              GLdouble _b_o_t_t_o_m,
              GLdouble _t_o_p,
              GLdouble _n_e_a_r___v_a_l,
              GLdouble _f_a_r___v_a_l )

PARAMETERS

_l_e_f_t, _r_i_g_h_t
Specify the coordinates for the left and right vertical clipping planes.
_b_o_t_t_o_m, _t_o_p
Specify the coordinates for the bottom and top horizontal clipping planes.
_n_e_a_r___v_a_l, _f_a_r___v_a_l
Specify the distances to the nearer and farther depth clipping planes. These values are negative if the plane is to be behind the viewer.

DESCRIPTION

ggllOOrrtthhoo describes a transformation that produces a parallel projection. The current matrix (see ggllMMaattrriixxMMooddee) is multiplied by this matrix and the result replaces the current matrix, as if ggllMMuullttMMaattrriixx were called with the following matrix as its argument:

left ( matrix { ccol { {2 over {"right" - "left"}} above 0 above 0 above 0 } ccol { 0 above {2 over {"top" - "bottom"}} above 0 above 0 } ccol { 0 above 0 above {-2 over {"far_val" - "near_val"}} above 0 } ccol { {t sub x}~ above {t sub y}~ above {t sub z}~ above 1~ } } right )

where t sub x ~=~ -^{{"right" ~+~ "left"} over {"right" ~-~ "left"}}

t sub y ~=~ -^{{"top" ~+~ "bottom"} over {"top" ~-~ "bottom"}}

t sub z ~=~ -^{{"far_val" ~+~ "near_val"} over {"far_val" ~-~ "near_val"}}

Typically, the matrix mode is GGLL__PPRROOJJEECCTTIIOONN, and (_l_e_f_t, _b_o_t_t_o_m, -_n_e_a_r___v_a_l) and (_r_i_g_h_t, _t_o_p, -_n_e_a_r___v_a_l) specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the window, respectively, assuming that the eye is located at (0, 0, 0). -_f_a_r___v_a_l specifies the location of the far clipping plane. Both _n_e_a_r___v_a_l and _f_a_r___v_a_l can be either positive or negative.

Use ggllPPuusshhMMaattrriixx and ggllPPooppMMaattrriixx to save and restore the current matrix stack.

ERRORS

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllOOrrtthhoo is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeett with argument GGLL__MMAATTRRIIXX__MMOODDEE
ggllGGeett with argument GGLL__CCOOLLOORR__MMAATTRRIIXX
ggllGGeett with argument GGLL__MMOODDEELLVVIIEEWW__MMAATTRRIIXX
ggllGGeett with argument GGLL__PPRROOJJEECCTTIIOONN__MMAATTRRIIXX
ggllGGeett with argument GGLL__TTEEXXTTUURREE__MMAATTRRIIXX

SEE ALSO

ggllFFrruussttuumm((33GG)), ggllMMaattrriixxMMooddee((33GG)), ggllMMuullttMMaattrriixx((33GG)), ggllPPuusshhMMaattrriixx((33GG)), ggllVViieewwppoorrtt((33GG))