4.17.2 MTLReader class

read( f)
Read the content of a file. f must be a file like object that can be used to read the content of the file.

begin( )
Callback method that is called before the file is read.

end( )
Callback method that is called after the file was read.

handleUnknown( cmd, arglist)
This method is called when a keyword is encountered that has no corresponding handler method.

The following are the predefined handler methods:

newmtl( name)
Start of a new material definition.

illum( model)
Illumination model.

Ka( col)
Ambient color.

Kd( col)
Diffuse color.

Ks( col)
Specular color.

Ke( col)
Emissive color.

Ns( shininess)

Ni( ref)
Refraction index.

Tr( alpha)
Transparency.

d( alpha)
Transparency.

Tf( col)
Transparency.

sharpness( v)

map_Ka( mapname, options)

map_Kd( mapname, options)

map_Ks( mapname, options)

map_Ke( mapname, options)

map_Ns( mapname, options)

map_d( mapname, options)

map_Bump( mapname, options)

refl( mapname, options)