Rotate the 3D model around the X, Y or Z axes.
Syntax: |
FWiz3DModel.Rotate(rotX, rotY, rotZ)
|
Parameters
Parameter |
Description |
rotX |
Rotation angle around the X axis. |
rotY |
Rotation angle around the Y axis. |
rotZ |
Rotation angle around the Z axis. |
Return Value
If an error occurs it returns false otherwise it returns true.
Example
|
Copy code
|
function OnBuild3DModel()
{
var ctx = FWiz.Get3DModelCtx();
var style = FWiz.Get3DStyle(0);
style.SetStyle("gold");
var cube1 = new DlxCube(10, 10, 10, style);
cube1.Move(0, 0, 10);
ctx.Add(cube1);
var cube2 = new DlxCube(10, 10, 10, style);
cube2.Move(0, 0, -10);
ctx.Add(cube2);
ctx.Rotate(0, 45, 0);
}
|
See also