fg_3Dsetmatrix()

Win32 DirectX Fastgraph/Light

Prototype

void fg_3Dsetmatrix (double *matrix, int flag, int update);

Sub fg_3Dsetmatrix (matrix() As Double, ByVal flag As Long, ByVal update As Long)

procedure fg_3Dsetmatrix (var matrix : double; flag, update : integer);

Description

The fg_3Dsetmatrix() function defines the elements in one of Fastgraph's 3D rotation, translation, or transformation matrices, and optionally update any matrix dependencies. This function is provided for the benefit of experienced 3D programmers who need access to Fastgraph's internal 3D matrices.

Parameters

matrix is the name of the array containing the matrix values. The first four elements of matrix are assumed to be the four values for the first row of the specified matrix, the next four elements are the values for the second row, and the last four elements are the values for the third row.

flag specifies which matrix to define:

FG_OBJECT_ROTATION

object to world rotation

FG_OBJECT_TRANSLATION

object to world translation

FG_OBJECT_TRANSFORM

object to world transformation

FG_WORLD_ROTATION

world to view rotation

FG_WORLD_TRANSLATION

world to view translation

FG_WORLD_TRANSFORM

world to view transformation

FG_COMBINED_TRANSFORM

object to view transformation

If flag is not one of the above values, fg_3Dsetmatrix() does nothing.

update specifies if any dependent matrices will be updated. If update is zero, only the matrix specified by flag will be updated. If update is any other value, any matrices that are dependent on the specified matrix will be updated too.

Return value

none

Restrictions

none

See also

fg_3Dgetmatrix()

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.