O3D_OBJECT_TYPE()

O3D_OBJECT_TYPE(N)

RETURNS THE TYPE OF THE 3D OBJECT NUMBER N

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

ACTION

The fonction O3D_OBJECT_TYPE(N) returns the type of the 3D object number N.

The type of a 3D object is coded as follows:

1=3D_CUBE

2=3D_BOX

3=3D_SPHERE

4=3D_CONE

5=3D_TORUS

6=3D_CYLINDER

7=3D_DODECAHEDRON

8=3D_TEAPOT

9=3D_TEXT

10=3D_LINE

11=3D_MESH

12=3D_ACTOR

14=3D_SKYBOX

16=3D_PLANE

The function O3D_OBJECT_TYPE(N) returns -1 if the 3D object number N does not exist.

SYNTAX: Result=O3D_OBJECT_TYPE(N)

  • N = 3D object number (integer or real).

USE

  • The function O3D_OBJECT_TYPE() is used to know the type of a 3D object.

ERROR

  • If number N is not a correct expression.

EXAMPLE

rem create a SCENE3D

scene3d 1

rem create a 3D object in the scene3d

3d_teapot 1

rem display its type as title

caption 0, o3d_object_type(1)

SEE ALSO

3D_ACTOR

3D_BOX

3D_CONE

3D_CUBE

3D_CYLINDER

3D_DODECAHEDRON

3D_LINE

3D_MESH

3D_PLANE

3D_SKYBOX

3D_SPHERE

3D_TEAPOT

3D_TEXT

3D_TORUS