[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
The graPHIGS Programming Interface : Subroutine Reference
GPEVM2 - Evaluate View Mapping Matrix 2
GPEVM2
(window,
viewpt,
errind,
matrix) |
Purpose
Use
GPEVM2 to create a view mapping matrix.
The matrix can be used
as input to the Set Extended View Representation
(GPXVR)
subroutine.
This subroutine returns a two-dimensional matrix.
The calculation of the view mapping matrix is as follows:
The
z extents for the viewport
are set to the
z extents of the
NPC range.
The projection type is set to
1=PARALLEL
The projection reference point is placed on a line
perpendicular to the center of the specified window.
The
z value of the projection reference point
is set to one-half
of the maximum of the Umax-Umin and Vmax-Vmin.
The view plane distance is set to zero.
The far clipping plane is set to the negative of one-half
of the maximum of the Umax-Umin and Vmax-Vmin.
The near clipping plane is set to one-half
of the maximum of the Umax-Umin and Vmax-Vmin.
If the view mapping matrix can be computed, the error indicator
is set to zero, and the matrix is returned.
If the matrix cannot
be computed, the error indicator contains an error number
indicating the reason.
In this case, the value of the output
parameter is unpredictable.
Parameters
window -- specified by user,
4 short floating-point numbers (VC)
Window limits (Umin, Umax, Vmin, Vmax)
viewpt -- specified by user,
4 short floating-point numbers (NPC)
Viewport limits (Xmin, Xmax, Ymin, Ymax)
errind -- returned by the graPHIGS API, fullword integer
Error indicator. If the error indicator is zero, the request has been
completed. Otherwise, one of the following errors exists:
- 44
- INVALID WINDOW DEFINITION
- 330
- INVALID VIEWPORT
matrix -- returned by the graPHIGS API,
9 short floating-point numbers
View mapping matrix.
For the output view matrix,
the elements are in the following order:
|m11 m12 m13|
|m21 m22 m23| --->(m11,m12,m13,m21.....m43)
|m41 m42 m43|
Error Codes
None
Related Subroutines
- GPXVR
- Set Extended View Representation
RCP code
201331208
(X'0C001208')
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]