Miscellaneous Transformation Utilities


For an overview about Utilities, see PEXlib Utilities.

This set of functions computes various useful transforms and applies transforms to points and vectors. Included in this set are:

Use PEXMapXCToNPC or PEXMapXCToNPC2D to find the PEX view containing a drawable coordinate (XC) point. PEXNPCToXCTransform and PEXNPCToXCTransform2D compute the matrix representing the transformation from the NPC subvolume through the DC viewport and on to drawable coordinates. PEXXCToNPCTransform and PEXXCToNPCTransform2D compute the inverse of this transformation. You can use these utilities to transform points from NPC to XC and back, using the same transformation used by a PEX renderer or a PHIGS workstation resource.

As an example of using these utilities, you can transform a list of modeling coordinate points to drawable coordinates by the following sequence:

By performing this operation in several steps, the application can precompute the matrices and apply them to several sets of points, at the same time skipping any steps that are unimportant.