int PEXViewOrientationMatrix( PEXCoord *vrp, PEXVector *vpn, PEXVector *vup, PEXMatrix matrix_return )
Zero if successful; otherwise, one of the following:
Invoke PEXViewOrientationMatrix to create 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.
The view reference point (vrp) defines the point in world coordinate space to be used as the origin of the view reference coordinate system.
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.
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.
The x axis of VRC is defined such that the VRC system forms a right-handed coordinate system.
None.
For a list of viewing transformation utilities, see Viewing Transformation Utilities. For a list of related topics, see PEXlib Utilities.