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

Method parseSmooth

loader/obj/obj.go:697–712  ·  view source on GitHub ↗

parseSmooth parses a "s" decription line: s <0|1>

(fields []string)

Source from the content-addressed store, hash-verified

695// parseSmooth parses a "s" decription line:
696// s <0|1>
697func (dec *Decoder) parseSmooth(fields []string) error {
698
699 if len(fields) < 1 {
700 return dec.formatError("'s' with no fields")
701 }
702
703 if fields[0] == "0" || fields[0] == "off" {
704 dec.smoothCurrent = false
705 return nil
706 }
707 if fields[0] == "1" || fields[0] == "on" {
708 dec.smoothCurrent = true
709 return nil
710 }
711 return dec.formatError("'s' with invalid value")
712}
713
714/******************************************************************************
715mtl parse functions

Callers 1

parseObjLineMethod · 0.95

Calls 1

formatErrorMethod · 0.95

Tested by

no test coverage detected