[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPCVMT - Compute View Matrix

GPCVMT (matrix)

Purpose

Use GPCVMT to calculate a view matrix based upon the values present in the Utility State List (USL) This view matrix is used as the view matrix parameter on the Set Extended View Representation (GPXVR) subroutine.

The matrix returned will perform a change of coordinate system from the World Coordinate (WC) system to a Viewing Coordinate (VC) system in which the origin is the view reference point, the n-axis is the view plane normal, and the v-axis lies in the half plane designated by the View Up vector. This matrix represents the change of coordinate systems by a translation operation followed by a rotation operation.

If the matrix cannot be calculated, the graPHIGS API issues an error.

Parameters

matrix -- returned by the graPHIGS API, 16 short floating-point numbers

Transformation matrix.

The elements are returned in the following order for the transformation matrix:

                 
  |m11 m12 m13 m14|
  |m21 m22 m23 m24| ---> (m11,m12,m13,m14,m21,...m44)
  |m31 m32 m33 m34|
  |m41 m42 m43 m44|
                 

Error Codes

58
UP AND PLANE NORMAL VECTORS ARE PARALLEL

Related Subroutines

None

RCP code

201331204 (X'0C001204')


[ Previous | Next | Contents | Glossary | Home | Search ]