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

Method parseNs

loader/obj/obj.go:886–897  ·  view source on GitHub ↗

Parses specular exponent Ns

(fields []string)

Source from the content-addressed store, hash-verified

884// Parses specular exponent
885// Ns <specular_exponent>
886func (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_#>

Callers 1

parseMtlLineMethod · 0.95

Calls 1

formatErrorMethod · 0.95

Tested by

no test coverage detected