O3D_Y_ROTATE()

O3D_Y_ROTATE(N)

RETURNS THE ROTATION ANGLE OF THE 3D OBJECT NUMBER N AROUND ITS Y AXIS

  • Type: Function
  • Parameter: 1
  • Group: 3D Objects

ACTION

The function O3D_Y_ROTATE(N) returns the rotation angle of the 3D object designated by its number N, around its own Y axis.

The own Y axis of the 3D object is the axis of object which was parallel to the 3D world Y axis when the 3D object was created.

The returned value is expressed in degrees.

SYNTAX: Result=O3D_Y_ROTATE(N)

  • N = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.
  • Result is expressed in degrees.

USE

  • The function O3D_Y_ROTATE() is used to know the rotation angle of a 3D object around its own Y axis.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of 3D objects.
  • If number N is not greater than 0.
  • If 3D object number N does not exist.

EXAMPLE

rem create a 3D world

scene3d 1

rem create a cube number 1

3d_cube 1,1.5

rem rotate it of 45 degrees around its own Y axis

3d_y_rotate 1,45

rem display its rotation angle on its Y axis

print o3d_y_rotate(1)

SEE ALSO

O3D_X_ROTATE()

O3D_Z_ROTATE()