gamnit :: MtlDef :: defaultinit
# Material defined in a `.mtl` file
class MtlDef
	# Name of this material
	var name: String
	# Ambient color
	var ambient = new Vec3 is lazy
	# Diffuse color
	var diffuse = new Vec3 is lazy
	# Specular color
	var specular = new Vec3 is lazy
	# Dissolved level, where 1.0 is fully visible
	var dissolved = 1.0
	# Transparency level, where 1.0 is fully invisible
	fun transparency: Float do return 1.0 - dissolved
	# Illumination model
	var illumination_model = 0
	# Ambient map
	var map_ambient: nullable String = null
	# Diffuse map
	var map_diffuse: nullable String = null
	# Bump map or normals texture
	var map_bump: nullable String = null
	# Specular reflectivity map
	var map_specular: nullable String = null
	# Specular exponent map
	var map_exponent: nullable String = null
	# Collect non-null maps from `map_diffuse, map_bump, map_specular, map_exponent`
	fun maps: Array[String]
	do
		return [for m in [map_ambient, map_diffuse, map_bump, map_specular, map_exponent] do if m != null then m]
	end
end
					lib/gamnit/model_parsers/mtl.nit:92,1--136,3