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

Chapter 11. Utility Subroutines

The subroutines in this category provide convenient mechanisms for modifying data or performing calculations.

Most subroutines perform transformations on matrixes. In addition, the Pack Data Record and Unpack Data Record utilities provide a convenient mechanism for the handling of data records used by input device initialization subroutines. These two utilities are defined only for the FORTRAN binding.

The Create Store and Delete Store utilities are defined only for the C binding. The graPHIGS API uses an object of type Store to facilitate the task of using a C binding subroutine which returns complex data.

BUILD TRANSFORMATION MATRIX (PHOP,*,*,*)

Purpose

Use Build Transformation Matrix to calculate a specified two-dimensional homogenous transformation matrix. The order of transformation is: scale, rotate (both relative to the specified fixed point), and shift.

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

2
Function Requires State (PHOP,*,*,*)

Language Bindings

C

pbuild_tran_matrix (point, shift_vec, angle, scale_vec, err_ind, result_tran)

Input Parameters

const Ppoint *point
Fixed point.

const Pvec *shift_vec
Shift vector.

Pfloat angle
Rotation angle in radians (positive if counterclockwise).

const Pvec *scale_vec
Scale vector.

Output Parameters

Pint *err_ind
Error indicator.

Pmatrix result_tran
Transformation matrix. (See Chapter 15. "ISO PHIGS Transformations" for a description of the storage of the transformation matrix).

FORTRAN

PBLTM (x0, y0, dx, dy, phi, fx, fy, errind, xfrmt)

Input Parameters

real x0
x coordinate of the fixed point.

real y0
y coordinate of the fixed point.

real dx
x offset of the shift vector.

real dy
y offset of the shift vector.

real phi
Rotation angle in radians (positive if counterclockwise).

real fx
x-axis scale factor.

real fy
y-axis scale factor.

Output Parameters

integer errind
Error indicator.

real xfrmt(3,3)
Transformation 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 ]