int PEXLookAtViewMatrix( PEXCoord *from, PEXCoord *to, PEXVector *up, PEXMatrix matrix_return )
Zero if successful; otherwise, one of the following:
Invoke PEXLookAtViewMatrix to create a view orientation transform that defines the viewing direction and orientation. This utility is a slightly more intuitive interface to PEXViewOrientationMatrix.
The from position defines the viewpoint, and the to position specifies the point being viewed. These two arguments together define the view reference point (the VRC origin) and the view plane normal of PEXViewOrientationMatrix. The view reference point is the to point; the view plane normal is the vector from to to from.
The view up vector is a 3D vector defined in world coordinates relative to the to point. The projection of this vector onto the plane through the to point and perpendicular to the view plane normal defines the y axis of VRC.
None.
For a list of viewing transformation utilities, see Viewing Transformation Utilities. For a list of related topics, see PEXlib Utilities.