vpWindowPHIGS - multiply the projection matrix by a PHIGS viewing matrix
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;
- VolPack context from vpCreateContext.
- Point specifying the view reference point.
- Vector specifying the view plane normal.
- Vector specifying the view up vector.
- Point specifying the projection reference point (in view reference
- Left coordinate of clipping window (in view reference coordinates).
- Right coordinate of clipping window (in view reference coordinates).
- Bottom coordinate of clipping window (in view reference coordinates).
- Top coordinate of clipping window (in view reference coordinates).
- Coordinate of the near depth clipping plane (in view reference
- Coordinate of the far depth clipping plane (in view reference
- Projection type code. Currently, must be VP_PARALLEL.
is 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 projection 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
(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 matrix
produced by vpWindowPHIGS
should 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 coordinates is
the view reference point. The basis vectors of VRC coordinates are:
- u = v cross n
v = the projection of vup parallel to vpn onto the
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
The direction of projection is the
vector from the center of the clipping window to the projection reference
which is also specified in VRC coordinates. Finally, the
front and back clipping planes are given by n= front
in VRC coordinates.
For a more detailed explanation of this view specification model, see
Computer Graphics: Principles and Practice
by Foley, vanDam, Feiner and
The current matrix concatenation parameters can be retrieved with the following
state variable codes (see vpGeti(3)): VP_CONCAT_MODE.
The normal return value is VP_OK. The following error return values are
- The clipping plane coordinates are invalid (umin >= umax,
- The type argument is invalid.
- The vectors defining view reference coordinates are not mutually
orthogonal, or the projection reference point lies in the view plane.
VolPack(3), vpCreateContext(3), vpCurrentMatrix(3), vpWindow(3)