mapw(3G) mapw(3G)
NAME
mapw - maps a point on the screen into a line in 3-D world
coordinates
SPECIFICATION
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*4 vobj, sx, sy
real wx1, wy1, wz1, wx2, wy2, wz2
DESCRIPTION
mapw takes a pair of 2-D screen coordinates and maps them
into 3-D world coordinates. Since the z coordinate is
missing from the screen coordinate system, 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, viewing transformation, and modeling
routines. A correct mapping from screen coordinate to world
coordinates requires that the viewing object contain the
projection and viewing transformations that mapped the
displayed object from world to screen coordinates. The
system returns a world space line, which is computed from
(sx, sy) and vobj, as two points and stores them in the
locations addressed by wx1, wy1, wz1 and wx2, wy2, wz2.
Page 1 (printed 8/20/87)
mapw(3G) mapw(3G)
SEE ALSO
mapw2
Programming Guide, Section 9.1, Mapping Screen Coordinates
to World Coordinates
NOTE
This routine is available only in immediate mode.
Page 2 (printed 8/20/87)