GsGetLw

Calculates a local-to-world transformation matrix

void GsGetLw (
        GsCOORDINATE2 *coord,
        MATRIX *m
)

Arguments

coord Pointer to a local coordinate system
m Pointer to the result matrix

Return Value

None.

Explanation

The local-to-world transformation matrix of the coordinate system pointed to by coord is calculated and the result is stored in the matrix pointed to by m.
The GsCOORDINATE2 structure pointed to by coord describes a node in the hierarchical coordinate system.
When the transformation matrix is calculated, calculation is performed for each node in the hierarchy and results are stored in the workm member within each node of the coordinate system.
To improve performance, calculation is only performed for nodes which have changed, as determined by the value of the flag member, even when GsGetLw() is called repeatedly. However, when a parent node is changed, all subordinate nodes will be recalculated automatically even if their flag members are set. It is the responsibility of the programmer to clear flag within each node if the member coord has changed, otherwise the transformation matrix will not be calculated correctly.

See Also

GsGetLws(), GsSetLightMatrix()