Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
vpWindowPHIGS(3)	    Library Functions Manual		vpWindowPHIGS(3)

NAME
     vpWindowPHIGS - multiply the projection matrix by a PHIGS viewing matrix

SYNOPSIS
     #include <volpack.h>

     vpResult
     vpWindowPHIGS(vpc, vrp, vpn, vup, prp, umin, umax, vmin, vmax, front, back,
	     projection_type)
	 vpContext *vpc;
	 vpVector3 vrp, vpn, vup;
	 vpVector3 prp;
	 double umin, umax, vmin, vmax, front, back;
	 int projection_type;

ARGUMENTS
     vpc    VolPack context from vpCreateContext.

     vrp    Point specifying the view reference point.

     vpn    Vector specifying the view plane normal.

     vup    Vector specifying the view up vector.

     prp    Point  specifying  the projection reference point (in view reference
	    coordinates).

     umin   Left coordinate of clipping window (in view reference coordinates).

     umax   Right coordinate of clipping window (in view reference coordinates).

     vmin   Bottom coordinate of clipping  window  (in	view  reference  coordi-
	    nates).

     vmax   Top coordinate of clipping window (in view reference coordinates).

     front  Coordinate of the near depth clipping plane (in view reference coor-
	    dinates).

     back   Coordinate	of the far depth clipping plane (in view reference coor-
	    dinates).

     projection_type
	    Projection type code.  Currently, must be VP_PARALLEL.

DESCRIPTION
     vpWindowPHIGS is used to multiply the current projection matrix by a  view-
     ing  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  projection  transforma-
     tion  matrix.  Since both the view and the projection are specified in this
     one matrix, normally the view transformation matrix is not used in conjunc-
     tion with vpWindowPHIGS (it should be set	to  the  identity).   Currently,
     only parallel projections may be specified.  For an alternative view speci-
     fication model, see vpWindow(3).

     Assuming  that  the  view transformation matrix is the identity, the matrix
     produced by vpWindowPHIGS should transform world coordinates into clip  co-
     ordinates.   This	transformation is specified as follows.  First, the pro-
     jection 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 coordinates is the view  refer-
     ence point.  The basis vectors of VRC coordinates are:

	 u = v cross n
	 v = the projection of vup parallel to vpn onto the view plane
	 n = vpn

     This  coordinate  system is used to specify the direction of projection and
     the clipping window.  The clipping window bounds in  the  projection  plane
     are given by umin, umax, vmin and vmax.  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=front and n=back in VRC coor-
     dinates.

     For  a more detailed explanation of this view specification model, see Com-
     puter Graphics: Principles  and  Practice	by  Foley,  vanDam,  Feiner  and
     Hughes.

STATE VARIABLES
     The  current matrix concatenation parameters can be retrieved with the fol-
     lowing state variable codes (see vpGeti(3)): VP_CONCAT_MODE.

ERRORS
     The 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
	    The type argument is invalid.

     VPERROR_SINGULAR
	    The vectors defining view reference coordinates are not mutually or-
	    thogonal, or the projection reference point lies in the view plane.

SEE ALSO
     VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpWindow(3)

VolPack 							vpWindowPHIGS(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=volpack-WindowPHIGS&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help