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).
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
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
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