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

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

Purpose

Use Build Transformation Matrix 3 to calculate a specified three-dimensional homogenous transformation matrix. The order of transformation which is all relative to the specified fixed point is: scale, rotate x, rotate y, rotate z, 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_matrix3 (point, shift_vec, x_angle, y_angle, z_angle, scale_vec, err_ind, result_tran)

Input Parameters

const Ppoint3 *point
Fixed point.

const Pvec3 *shift_vec
Shift vector.

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

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

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

const Pvec3 *scale_vec
Scale vector.

Output Parameters

Pint *err_ind
Error indicator.

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

FORTRAN

PBLTM3 (x0, y0, z0, dx, dy, dz, phix, phiy, phiz, fx, fy, fz, errind, xfrmt)

Input Parameters

real x0
x coordinate of the fixed point.

real y0
y coordinate of the fixed point.

real z0
z coordinate of the fixed point.

real dx
x offset of the shift vector.

real dy
y offset of the shift vector.

real dz
z offset of the shift vector.

real phix
Rotation angle x in radians (positive if counterclockwise).

real phiy
Rotation angle y in radians (positive if counterclockwise).

real phiz
Rotation angle z in radians (positive if counterclockwise).

real fx
x-axis scale factor.

real fy
y-axis scale factor.

real fz
z-axis scale factor.

Output Parameters

integer errind
Error indicator.

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