Trans_Rotate

Category: Arithmetics
Since engine version: 1.0 OC

Description

Returns a 3x4 rotation matrix around the axis given by the vector (rx, ry, rz) by angle degrees. It can be used as a transformation for AttachMesh or for the "PictureTransformation" or "MeshTransformation" properties (see Meshes).

Syntax

array Trans_Rotate(int angle, int rx, int ry, int rz);

Parameters

angle:
Rotation angle. When looking into the same direction as the rotation axis then positive angles do anti-clockwise rotation and negative angles do clockwise rotation.
rx:
X coordinate of the rotation axis.
ry:
Y coordinate of the rotation axis.
rz:
Z coordinate of the rotation axis.

Example

this["PictureTransformation"] = Trans_Rotate(20, 0, 1, 0);
Rotates the picture graphics of the calling object by 20 degrees around the Y axis.
See also: AttachMesh, SetAttachTransform, Trans_Identity, Trans_Mul, Trans_Scale, Trans_Translate
Clonk-Karl, 2010-04