Parses specular exponent Ns
(fields []string)
| 884 | // Parses specular exponent |
| 885 | // Ns <specular_exponent> |
| 886 | func (dec *Decoder) parseNs(fields []string) error { |
| 887 | |
| 888 | if len(fields) < 1 { |
| 889 | return dec.formatError("'Ns' with no fields") |
| 890 | } |
| 891 | val, err := strconv.ParseFloat(fields[0], 32) |
| 892 | if err != nil { |
| 893 | return dec.formatError("'d' parse float error") |
| 894 | } |
| 895 | dec.matCurrent.Shininess = float32(val) |
| 896 | return nil |
| 897 | } |
| 898 | |
| 899 | // Parses illumination model (0 to 10) |
| 900 | // illum <ilum_#> |
no test coverage detected