MCPcopy Index your code
hub / github.com/g3n/engine / parseIllum

Method parseIllum

loader/obj/obj.go:901–912  ·  view source on GitHub ↗

Parses illumination model (0 to 10) illum

(fields []string)

Source from the content-addressed store, hash-verified

899// Parses illumination model (0 to 10)
900// illum <ilum_#>
901func (dec *Decoder) parseIllum(fields []string) error {
902
903 if len(fields) < 1 {
904 return dec.formatError("'illum' with no fields")
905 }
906 val, err := strconv.ParseUint(fields[0], 10, 32)
907 if err != nil {
908 return dec.formatError("'d' parse int error")
909 }
910 dec.matCurrent.Illum = int(val)
911 return nil
912}
913
914// Parses color texture linked to the diffuse reflectivity of the material
915// map_Kd [-options] <filename>

Callers 1

parseMtlLineMethod · 0.95

Calls 1

formatErrorMethod · 0.95

Tested by

no test coverage detected