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

EVALUATE VIEW ORIENTATION MATRIX 3 (PHOP,*,*,*)

Purpose

Use Evaluate View Orientation Matrix 3 to calculate a three-dimensional viewing matrix based on the specified orientation.

The matrix returned performs a change 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.

If the graPHIGS API can compute the view orientation matrix, then the graPHIGS API sets the error indicator to zero and returns the view orientation matrix. If the graPHIGS API cannot compute the view orientation matrix, then the values of the matrix are unpredictable and the graPHIGS API sets the error indicator to one of the following errors:

2
Function Requires State (PHOP,*,*,*)
159
View Plane Normal Vector Has Length Zero
160
View UP Vector Has Length Zero
161
View UP AND View Plane Normal Vectors Are Parallel

Language Bindings

C

peval_view_ori_matrix3 (view_ref_point, view_norm_vec, view_up_vec, err_ind, result_tran)

Input Parameters

const Ppoint3 *view_ref_point
View reference point in WC.

const Pvec3 *view_norm_vec
View plane normal vector in WC.

const Pvec3 *view_up_vec
View up vector in WC.

Output Parameters

Pint *err_ind
Error indicator.

Pmatrix3 result_tran
View orientation matrix. (See Chapter 15. "ISO PHIGS Transformations" for a description of the storage of the transformation matrix).

FORTRAN

PEVOM3 (vwrx, vwry, vwrz, vpnx, vpny, vpnz, vupx, vupy, vupz, errind, vwormt)

Input Parameters

real vwrx
x coordinate of the view reference point in WC.

real vwry
y coordinate of the view reference point in WC.

real vwrz
z coordinate of the view reference point in WC.

real vpnx
x-axis directional component of the view plane normal in WC.

real vpny
y-axis directional component of the view plane normal in WC.

real vpnz
z-axis directional component of the view plane normal in WC.

real vupx
x-axis directional component of the view up vector in WC.

real vupy
y-axis directional component of the view up vector in WC.

real vupz
z-axis directional component of the view up vector in WC.

Output Parameters

integer errind
Error indicator.

real vwormt(4,4)
View orientation matrix. (See Chapter 15. "ISO PHIGS Transformations" for a description of the storage of the transformation matrix).

Errors

None

Related Subroutines

  • None


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