3.3. The 'mp_types.inc' include file
Prev | Chapter 3. MegaPOV Include files | Next

## 3.3. The '`mp_types.inc`' include file

### Włodzimierz ABX Skiba

This part describes the `mp_types.inc` include file that comes with MegaPOV and contains macros for simplification of type checking. Some user might be disappointed with syntax of `is` function (see Section 2.2.3.6, “Type checking”) and this syntax can be different in the future so this file creates layer between scripts and hard coded syntax of type checking (for example for usage in `#switch` block).

### 3.3.1. The `Type_Of(`Id`)` macro

Macro `Type_Of(`Id`)` returns one of following constants for given `Id`:

    UNDEFINED_ID,    ARRAY_ID,       CAMERA_ID,
    COLOR_ID,        COLOR_MAP_ID,   DENSITY_ID,
    DENSITY_MAP_ID,  FINISH_ID,      FLOAT_ID,
    FOG_ID,          FUNCTION_ID,    INTERIOR_ID,
    LIGHT_SOURCE_ID, MATERIAL_ID,    MEDIA_ID,
    NORMAL_ID,       NORMAL_MAP_ID,  OBJECT_ID,
    PIGMENT_ID,      PIGMENT_MAP_ID, RAINBOW_ID,
    SKY_SPHERE_ID,   SLOPE_MAP_ID,   SPLINE_ID,
    STRING_ID,       TEXTURE_ID,     TEXTURE_MAP_ID,
    TRANSFORM_ID,    VECTOR_ID

### 3.3.2. The `Type_Of_Spline(`Id`)` macro

Macro `Type_Of_Spline(`Id`)` returns one of following constants for given `Id`:

    NOT_SPLINE,    AKIMA_SPLINE,      BASIC_X_SPLINE,
    CUBIC_SPLINE,  EXTENDED_X_SPLINE, GENERAL_X_SPLINE,
    LINEAR_SPLINE, NATURAL_SPLINE,    QUADRATIC_SPLINE,
    SOR_SPLINE,    TCB_SPLINE

### 3.3.3. The `Type_Of_Object(`Id`)` macro

Macro `Type_Of_Object(`Id`)` returns one of following constants for given `Id`:

    NOT_OBJECT,          BICUBIC_PATCH_OBJECT,   BLOB_OBJECT,
    BOX_OBJECT,          CONE_OBJECT,            CUBIC_OBJECT,
    CYLINDER_OBJECT,     DISC_OBJECT,            HEIGHT_FIELD_OBJECT,
    INTERSECTION_OBJECT, ISOSURFACE_OBJECT,      JULIA_FRACTAL_OBJECT,
    LATHE_OBJECT,        MERGE_OBJECT,           MESH_OBJECT,
    PARAMETRIC_OBJECT,   PLANE_OBJECT,           POLY_OBJECT,
    POLYGON_OBJECT,      PRISM_OBJECT,           QUADRIC_OBJECT,
    QUARTIC_OBJECT,      SMOOTH_TRIANGLE_OBJECT, SOR_OBJECT,
    SPHERE_OBJECT,       SPHERE_SWEEP_OBJECT,    SUPERELLIPSOID_OBJECT,
    TEXT_OBJECT,         TORUS_OBJECT,           TRIANGLE_OBJECT,
    UNION_OBJECT

### 3.3.4. The `Type_Of_Camera(`Id`)` macro

Macro `Type_Of_Camera(`Id`)` returns one of following constants for given `Id`:

    NOT_CAMERA,         CYLINDER_CAMERA,     FISHEYE_CAMERA
    OMNIMAX_CAMERA,     ORTHOGRAPHIC_CAMERA, PANORAMIC_CAMERA,
    PERSPECTIVE_CAMERA, SPHERICAL_CAMERA,    ULTRA_WIDE_ANGLE_CAMERA,
    USER_DEFINED_CAMERA

Prev | Up | Next
3.2. The 'mp_consts.inc' include file | Home | 3.4. The 'mechsim.inc' include file