C4 Engine Terathon Software C4 Engine API Documentation

• Math Library

API Links
Developer Links

Transform4D::SetScale

Defined in:  C4Matrix4D.h
Sets a matrix to represent a scale.
Prototype

Transform4D& SetScale(float t);

Transform4D& SetScale(float r, float s, float t);

Parameters
s The scale along the x axis.
r The scale along the y axis.
t The scale along the z axis, or if specified by itself, the scale along all three axes.
Description
The SetScale function replaces all entries of a matrix with those representing a scale. If only the t parameter is specified, then the scale is uniform along all three axes. If the r, s, and t parameters are specified, then they correspond to the scale along the x-, y, and z axis, respectively. The entries of the fourth row and fourth column of the matrix are set to those of the identity matrix.

The return value is a reference to the matrix object.
See Also

Matrix4D::SetIdentity