Parses emissive color: Ke r g b
(fields []string)
| 831 | // Parses emissive color: |
| 832 | // Ke r g b |
| 833 | func (dec *Decoder) parseKe(fields []string) error { |
| 834 | |
| 835 | if len(fields) < 3 { |
| 836 | return dec.formatError("'Ke' with less than 3 fields") |
| 837 | } |
| 838 | var colors [3]float32 |
| 839 | for pos, f := range fields[:3] { |
| 840 | val, err := strconv.ParseFloat(f, 32) |
| 841 | if err != nil { |
| 842 | return err |
| 843 | } |
| 844 | colors[pos] = float32(val) |
| 845 | } |
| 846 | dec.matCurrent.Emissive.Set(colors[0], colors[1], colors[2]) |
| 847 | return nil |
| 848 | } |
| 849 | |
| 850 | // Parses specular reflectivity: |
| 851 | // Ks r g b |
no test coverage detected