Return to previous page | Return to menu | Go to next page


5-3. Matrix functions

SGL supports the following functions in addition to those described above as library functions related to matrix operations.

[void slLoadMatrix (MATRIX mtptr)]

Copies the specified matrix as a parameter to the current matrix
. For the parameter, substitute the MATRIX type variable of the specified matrix.

[void slGetMatrix (MATRIX mtptr)]

Copies the current matrix to the matrix specified as a parameter. For the parameter, substitute the MATRIX type variable of the specified matrix.

[void slMultiMatrix (MATRIX mtrx)]

Multiplies the current matrix by the matrix specified as a parameter. For the parameter, substitute the MATRIX type variable of the specified matrix.

[Bool slPushUnitMatrix (void)]

Reserves a unit matrix on the stack and makes it the current matrix.
The previous current matrix is ​​temporarily saved at a higher level in the stack.

[void slUnitMatrix (MATRIX mtptr)]

Makes the matrix specified as the parameter a unit matrix. For the parameter, substitute the MATRIX type variable of the specified matrix.
In addition, only when “CURRENT” is assigned to the parameter, the target matrix becomes the current matrix, and the current matrix can be initialized.

Note: SGL library functions that appeared in this chapter

In this chapter, the functions in the following table were explained.

Table 5-1 SGL library functions that appeared in this chapter


Return to previous page | Return to menu | Go to next page