# FreeBSD Manual Pages

vpWindowPHIGS(3) Library Functions Manual vpWindowPHIGS(3)NAMEvpWindowPHIGS - multiply the projection matrix by a PHIGS viewing ma- trixSYNOPSIS#include <volpack.h> vpResultvpWindowPHIGS(vpc,vrp,vpn,vup,prp,umin,umax,vmin,vmax,front,back,projection_type)vpContext *vpc;vpVector3vrp,vpn,vup;vpVector3prp;doubleumin,umax,vmin,vmax,front,back;intprojection_type;ARGUMENTSvpcVolPack context fromvpCreateContext.vrpPoint specifying the view reference point.vpnVector specifying the view plane normal.vupVector specifying the view up vector.prpPoint specifying the projection reference point (in view refer- ence coordinates).uminLeft coordinate of clipping window (in view reference coordi- nates).umaxRight coordinate of clipping window (in view reference coordi- nates).vminBottom coordinate of clipping window (in view reference coordi- nates).vmaxTop coordinate of clipping window (in view reference coordi- nates).frontCoordinate of the near depth clipping plane (in view reference coordinates).backCoordinate of the far depth clipping plane (in view reference coordinates).projection_typeProjection type code. Currently, must be VP_PARALLEL.DESCRIPTIONvpWindowPHIGSis used to multiply the current projection matrix by a viewing and projection matrix specified by means of the PHIGS viewing model. This model combines specification of the viewpoint, projection and clipping parameters. The resulting matrix is stored in the projec- tion transformation matrix. Since both the view and the projection are specified in this one matrix, normally the view transformation matrix is not used in conjunction withvpWindowPHIGS(it should be set to the identity). Currently, only parallel projections may be specified. For an alternative view specification model, see vpWindow(3). Assuming that the view transformation matrix is the identity, the ma- trix produced byvpWindowPHIGSshould transform world coordinates into clip coordinates. This transformation is specified as follows. First, the projection plane (called the view plane) is defined by a point on the plane (the view reference point,vrp) and a vector normal to the plane (the view plane normal,vpn). Next, a coordinate system called the view reference coordinate (VRC) system is specified by means of the view plane normal and the view up vector,vup.The origin of VRC coor- dinates is the view reference point. The basis vectors of VRC coordi- nates are:u= v cross nv= the projection ofvupparallel tovpnonto the view planen=vpnThis coordinate system is used to specify the direction of pro- jection and the clipping window. The clipping window bounds in the projection plane are given byumin,umax,vminandvmax.The direction of projection is the vector from the center of the clipping window to the projection reference point(prp),which is also specified in VRC coordinates. Finally, the front and back clipping planes are given by n=frontand n=backin VRC coordinates. For a more detailed explanation of this view specification model, seeComputerGraphics:PrinciplesandPracticeby Foley, vanDam, Feiner and Hughes.STATE VARIABLESThe current matrix concatenation parameters can be retrieved with the following state variable codes (see vpGeti(3)): VP_CONCAT_MODE.ERRORSThe normal return value is VP_OK. The following error return values are possible: VPERROR_BAD_VALUE The clipping plane coordinates are invalid (umin_=umax, etc.). VPERROR_BAD_OPTION Thetypeargument is invalid. VPERROR_SINGULAR The vectors defining view reference coordinates are not mutually orthogonal, or the projection reference point lies in the view plane.SEE ALSOVolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpWindow(3) VolPack vpWindowPHIGS(3)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | STATE VARIABLES | ERRORS | SEE ALSO

Want to link to this manual page? Use this URL:

<https://www.freebsd.org/cgi/man.cgi?query=volpack-WindowPHIGS&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>