SCENE3D

SCENE3D N

CREATES A SCENE3D AND GIVES IT NUMBER N AS REFERENCE

  • Type: Command
  • Parameter: 1
  • Group: System Objects Creation

ACTION

The command SCENE3D N creates a SCENE3D to display a 3D world, and gives it a number N. The number N will be used to designate the SCENE3D.

The SCENE3D owns a light to "lighten" the 3D objects and a camera used to "see" the 3D objects.

The 3D objects can then be created and processed through the appropriated commands to be animated, moved, rotated, scaled, colored, textured, deleted, hidden, showed, ...

The SCENE3D is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 200 pixels and HEIGHT = 200 pixels.

When it is created, the colour of a SCENE3D is white.

A SCENE3D can generate the events : ON_CLICK, ON_DOUBLE_CLICK.

Remark: by default, the SCENE3D is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the SCENE3D.

SYNTAX: SCENE3D N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • A SCENE3D is used to handle a 3D world with light, camera, and 3D objects which can be animated, moved, rotated, scaled, colored, textured, deleted, hidden, showed, ...

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

rem create a SCENE3D number 1 with default position and dimensions

scene3D 1

rem create a 3D OBJECT number 1 (a teapot)

3d_teapot 1

SEE ALSO

FILE_NAME$()