.\" @(#)PEXViewOrientationMatrix.3 1.4 95/03/24 SMI; .so man3/pex.macs .TH PEXViewOrientationMatrix 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXViewOrientationMatrix - utility function .SH SYNTAX .HP int PEXViewOrientationMatrix\^(\^PEXCoord *\fIvrp\fP, PEXVector *\fIvpn\fP, PEXVector *\fIvup\fP, PEXMatrix \fImatrix_return\fP\^) .SH PARAMETERS .IP \fIvrp\fP 1i View reference point. .IP \fIvpn\fP 1i View plane normal. .IP \fIvup\fP 1i View up vector. .IP \fImatrix_return\fP 1i Matrix into which result is stored. .SH RETURNS .LP Zero if successful; otherwise, one of the following: .TP .B PEXBadVector Either .I vpn or .I vup is zero length. .TP .B PEXBadVectors .I vup is parallel to .I vpn. .SH DESCRIPTION .\" indexing .IX PEXViewOrientationMatrix .LP This function creates a view orientation matrix that transforms world coordinates (WC) to view reference coordinates (VRC). This matrix is used in conjunction with a view mapping matrix as the viewing matrices for a designated view. .LP The view reference point (VRP) defines the point in world coordinate space that is to be used as the origin of the view reference coordinate system. .LP The view plane normal (VPN) is a 3D vector defined in world coordinates relative to the view reference point. This gives the direction of the positive Z axis of VRC. .LP The view up vector (VUP) is a 3D vector defined in world coordinates relative to the view reference point. The projection of this vector onto the plane through the view reference point and perpendicular to the view plane normal defines the Y axis of VRC. .LP The X axis of VRC is defined such that the VRC system forms a right-handed coordinate system. .SH ERRORS .LP None .SH SEE ALSO .LP .nf .BR PEXViewOrientationMatrix2D (3) .BR PEXViewMappingMatrix (3) .BR PEXViewMappingMatrix2D (3) .fi