Brief Index      Full Index      I.M. Reference

Set_Modelling_Matrix


Functions

void Set_Modelling_Matrix (const float *matrix)
void QSet_Modelling_Matrix (const char *segment, const float *matrix)
void UnSet_Modelling_Matrix (void)
void QUnSet_Modelling_Matrix (const char *segment)

Function Documentation

void Set_Modelling_Matrix ( const float *  matrix  ) 

Allows direct manipulation of the transformation that is applied against all the picture elements in a segment.

Parameters:
matrix - Transformation matrix provided by the user. Passed by reference in all languages. May need to be transposed in languages other than C.

DETAILS

On the way out to the screen, each (x, y, z) coordinate triple can be thought of as encountering the following: First, the modelling transformation (there may a stack of them). Second, the camera or viewing transformation (only one). Third, any Window (a stack, again). And lastly, the particular device's coordinate system.


(Of course, the system combines these in advance to give one net transformation.)

Set_Modelling_Matrix() allows you to manipulate the first stage, but it is more common to accumulate a net modelling transformation by calling the utility routines Rotate, Translate, or Scale Object one or more times. If your program has a special need to compute and track geometric transformations, you can load the matrix directly.

Modelling matrices are cumulative---if another modelling matrix specification is encountered higher or lower in the segment tree, the matrices are combined (multiplied together) to give the logical effect.

The array should be stored so the column varies faster than the row as you proceed through consecutive memory locations. In C and Pascal, this usually means the first index of the array is the row index and the second index is the column. In Fortran, the first index is usually the column and the second is the row.

The first, second, and third rows of the fourth column of array must be zero---no "perspective" transformation is allowed. The fourth row of the fourth column is usually 1.0 (it must not be zero.)

NOTES

RESTRICTIONS

See also:
Rotate_Object, Translate_Object, Scale_Object, Append_Modelling_Matrix, Set_Camera_Position.

void QSet_Modelling_Matrix ( const char *  segment,
const float *  matrix 
)

Similar to Set_Modelling_Matrix(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Name of the segment(s) to be changed.
matrix - Transformation matrix provided by the user. Passed by reference in all languages. May need to be transposed in languages other than C.

DETAILS

No additional details. See Set_Modelling_Matrix()

void UnSet_Modelling_Matrix ( void   ) 

Removes all settings established by a previous call to Set_Modelling_Matrix().

DETAILS

No additional details. See Set_Modelling_Matrix()

void QUnSet_Modelling_Matrix ( const char *  segment  ) 

Removes all settings established by a previous call Set_Modelling_Matrix(), but operates on a given segment rather than the currently open one.

Parameters:
segment - Name of the segment(s) to be changed.

DETAILS

No additional details. See Set_Modelling_Matrix()

Main Index
Brief Index      Full Index      I.M. Functions