neuray API Programmer's Manual

mi::neuraylib::IType Class Reference

[MDL type system]

Description

The interface to MDL types. Types can be created using the type factory mi::neuraylib::IType_factory.

Public Enumerations

enum Kind{ TK_ALIAS, TK_BOOL, TK_INT, TK_ENUM, TK_FLOAT, TK_DOUBLE, TK_STRING, TK_VECTOR, TK_MATRIX, TK_COLOR, TK_ARRAY, TK_STRUCT, TK_TEXTURE, TK_LIGHT_PROFILE, TK_BSDF_MEASUREMENT, TK_BSDF, TK_HAIR_BSDF, TK_EDF, TK_VDF, TK_FORCE_32_BIT = 0xffffffffU}
The possible kinds of types.
enum Modifier{ MK_NONE = 0, MK_UNIFORM = 2, MK_VARYING = 4, MK_FORCE_32_BIT}
The possible kinds of type modifiers.

Public Member Functions

virtual Uint32 get_all_type_modifiers() const =0
Returns all type modifiers of a type. More...
virtual Kind get_kind() const =0
Returns the kind of type.
virtual const ITypeskip_all_type_aliases() const =0
Returns the base type. More...

Enums

enum mi::​neuraylib::​IType::Kind

The possible kinds of types.

Enumerator:

TK_ALIAS
An alias for another type, aka typedef. See mi::neuraylib::IType_alias.
TK_BOOL
The boolean type. See mi::neuraylib::IType_bool.
TK_INT
The integer type. See mi::neuraylib::IType_int.
TK_ENUM
An enum type. See mi::neuraylib::IType_enum.
TK_FLOAT
The float type. See mi::neuraylib::IType_float.
TK_DOUBLE
The double type. See mi::neuraylib::IType_double.
TK_STRING
The string type. See mi::neuraylib::IType_string.
TK_VECTOR
A vector type. See mi::neuraylib::IType_vector.
TK_MATRIX
A matrix type. See mi::neuraylib::IType_matrix.
TK_COLOR
The color type. See mi::neuraylib::IType_color.
TK_ARRAY
An array type. See mi::neuraylib::IType_array.
TK_STRUCT
A struct type. See mi::neuraylib::IType_struct.
TK_TEXTURE
A texture type. See mi::neuraylib::IType_texture.
TK_LIGHT_PROFILE
The light_profile type. See mi::neuraylib::IType_light_profile.
TK_BSDF_MEASUREMENT
The bsdf_measurement type. See mi::neuraylib::IType_bsdf_measurement.
TK_BSDF
The bsdf type. See mi::neuraylib::IType_bsdf.
TK_HAIR_BSDF
The hair_bsdf type. See mi::neuraylib::IType_hair_bsdf.
TK_EDF
The edf type. See mi::neuraylib::IType_edf.
TK_VDF
The vdf type. See mi::neuraylib::IType_vdf.
TK_FORCE_32_BIT = 0xffffffffU
enum mi::​neuraylib::​IType::Modifier

The possible kinds of type modifiers.

Enumerator:

MK_NONE = 0
No type modifier (mutable, auto-typed).
MK_UNIFORM = 2
A uniform type.
MK_VARYING = 4
A varying type.
MK_FORCE_32_BIT

Member Functions

virtual Uint32 mi::​neuraylib::​IType::get_all_type_modifiers() const [pure virtual]

Returns all type modifiers of a type. Returns 0 if this is not an alias. Otherwise, the method follows the chain of aliases by calling mi::neuraylib::IType_alias::get_aliased_type() as long as get_kind() returns TK_ALIAS. The method returns the union of mi::neuraylib::IType_alias::get_type_modifiers() calls on this and all intermediate aliases.

virtual Kind mi::​neuraylib::​IType::get_kind() const [pure virtual]

Returns the kind of type.

virtual const IType* mi::​neuraylib::​IType::skip_all_type_aliases() const [pure virtual]

Returns the base type. Returns this if this is not an alias. Otherwise, the method follows the chain of aliases by calling mi::neuraylib::IType_alias::get_aliased_type() as long as get_kind() returns TK_ALIAS. The method returns the first non-alias type.