EVALUATE VIEW ORIENTATION MATRIX(3P) — SUNPHIGS LIBRARY
NAME
EVALUATE VIEW ORIENTATION MATRIX − calculate a transformation matrix that orients the View Reference Coordinate system in the World Coordinate system
SYNOPSIS
C Syntax
void
pevalvieworientationmatrix ( vrp, vup, error_ind, matrix )
Ppoint∗vrp;view reference point
Pvector∗vup;view up vector
Pint∗error_ind;OUT error indicator
Pmatrixmatrix;OUT view orientation matrix
FORTRAN Syntax
SUBROUTINE pevom ( VWRX, VWRY, VUPX, VUPY, ERRIND, VWORMT )
REALVWRX, VWRYview reference point (WC)
REALVUPX, VUPYview up vector (WC)
INTEGERERRINDOUT error indicator
REALVWORMT(3, 3)OUT view orientation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use EVALUATE VIEW ORIENTATION MATRIX to calculate a view orientation matrix, used to transform World Coordinates (WC) to View Reference Coordinates (VRC). This matrix establishes the u, v, and n VRC axes in relation to WC space. The view orientation matrix calculated by this function can be passed as an argument to SET VIEW REPRESENTATION.
See the descriptions of the functions SET VIEW REPRESENTATION and EVALUATE VIEW MAPPING MATRIX in this function reference for more information.
C Input Parameters
vrpA pointer to a Ppoint structure containing x and y WCs that specify the view reference point. Ppoint is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;
vupA pointer to a Pvector structure containing x and y WC values that specify the view up vector. Pvector is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x magnitude ∗/
Pfloaty;/∗ y magnitude ∗/
} Pvector;
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
matrixThe 2D homogeneous (3 x 3) view orientation matrix. Pmatrix is defined in phigs.h as follows:
typedef Pfloat Pmatrix[3][3];
FORTRAN Input Parameters
VWRX, VWRY
The x and y WC that specify the view reference point.
VUPX, VUPY
The x and y WC values that specify the view up vector.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
VWORMT
The 2D homogeneous (3 x 3) view orientation matrix.
Execution
If the input parameters are consistent and well defined, EVALUATE VIEW ORIENTATION MATRIX returns a 2D homogeneous (3 x 3) transformation matrix in the output parameter view orientation matrix. This matrix transforms WC to VRC according to the values of the input parameters.
The view reference point defines the point in WC space that is to be used as the origin of the VRC system. It is specified as a 2D point in the z = 0 plane of the WC system and is usually a point on or near the object to be viewed.
The view up vector defines the UP direction of the VRC system. It is specified as a 2D vector relative to the view reference point. This vector defines a direction in the WC z = 0 plane. This direction becomes the v axis of the VRC system. The n axis of VRC is parallel to the z axis of the WC system, and the u axis is determined so that u, v, and n axes form a right-handed coordinate system.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
160Ignoring function, the view up vector has length zero
Sun Release 4.0 — Last change: 31 July 1989