mapw(3) — Silicon Graphics R1c
NAME
mapw - map a point on the screen into a line in 3D world coordinates
SYNOPSIS
C
mapw(vobj, sx, sy, wx1, wy1, wz1, wx2, wy2, wz2)
Object vobj;
Screencoord sx, sy;
Coord *wx1, *wy1, *wz1, *wx2, *wy2, *wz2;
FORTRAN
subroutine mapw(vobj, sx, sy, wx1, wy1, wz1, wx2, wy2, wz2)
integer vobj
integer*2 sx, sy
real wx1, wy1, wz1, wx2, wy2, wz2
Pascal
procedure mapw(vobj: Object; sx, sy: Screencoord;
var wx1, wy1, wz1, wx2, wy2, wz2: Coord);
DESCRIPTION
Mapw takes a 2D screen coordinate and maps it into 3D world space. Since the z-coordinate is missing from screen space, the point becomes a line in world space. Mapw computes the inverse mapping from vobj, a viewing object. A viewing object is a graphical object that contains only viewport, projection and viewing transformation commands. A correct mapping from screen to world space requires that the viewing object contain the projection and viewing transformations that mapped the displayed object from world to screen coordinates. The world space line that is computed from (sx, sy) and vobj is returned as two points and stored in the locations addressed by wx1, wy1, wz1 and wx2, wy2, wz2.
SEE ALSO
mapw2
NOTE
This command can only be used in immediate mode.
Version 2.3 — July 04, 1985