@@ -504,7 +504,7 @@ func (o *Obj) ToWriter(w io.Writer) error {
504
504
}
505
505
506
506
// NewObjFromVertex creates Obj from vertex data.
507
- func NewObjFromVertex (objName string , coord []float32 , indices []int ) (* Obj , error ) {
507
+ func NewObjFromVertex (coord []float32 , indices []int ) (* Obj , error ) {
508
508
o := & Obj {}
509
509
510
510
group := o .newGroup ("" , "" , 0 , 0 )
@@ -574,7 +574,7 @@ func readObj(objName string, reader StringReader, options *ObjParserOptions) (*O
574
574
o := & Obj {}
575
575
576
576
// 1. vertex-only parsing
577
- if fatal , err := readLines (p , o , reader , options ); err != nil {
577
+ if fatal , err := readLines (p , reader , options ); err != nil {
578
578
if fatal {
579
579
return o , err
580
580
}
@@ -586,7 +586,7 @@ func readObj(objName string, reader StringReader, options *ObjParserOptions) (*O
586
586
p .normLines = 0
587
587
588
588
// 2. full parsing
589
- if fatal , err := scanLines (p , o , reader , options ); err != nil {
589
+ if fatal , err := scanLines (p , o , options ); err != nil {
590
590
if fatal {
591
591
return o , err
592
592
}
@@ -625,15 +625,15 @@ func readObj(objName string, reader StringReader, options *ObjParserOptions) (*O
625
625
return o , nil
626
626
}
627
627
628
- func readLines (p * objParser , o * Obj , reader StringReader , options * ObjParserOptions ) (bool , error ) {
628
+ func readLines (p * objParser , reader StringReader , options * ObjParserOptions ) (bool , error ) {
629
629
p .lineCount = 0
630
630
631
631
for {
632
632
p .lineCount ++
633
633
line , err := reader .ReadString ('\n' )
634
634
if err == io .EOF {
635
635
// parse last line
636
- if fatal , e := parseLineVertex (p , o , line , options ); e != nil {
636
+ if fatal , e := parseLineVertex (p , line , options ); e != nil {
637
637
options .log (fmt .Sprintf ("readLines: %v" , e ))
638
638
return fatal , e
639
639
}
@@ -645,7 +645,7 @@ func readLines(p *objParser, o *Obj, reader StringReader, options *ObjParserOpti
645
645
return ErrFatal , fmt .Errorf ("readLines: error: %v" , err )
646
646
}
647
647
648
- if fatal , e := parseLineVertex (p , o , line , options ); e != nil {
648
+ if fatal , e := parseLineVertex (p , line , options ); e != nil {
649
649
options .log (fmt .Sprintf ("readLines: %v" , e ))
650
650
if fatal {
651
651
return fatal , e
@@ -657,7 +657,7 @@ func readLines(p *objParser, o *Obj, reader StringReader, options *ObjParserOpti
657
657
}
658
658
659
659
// parseLineVertex: parse only vertex lines
660
- func parseLineVertex (p * objParser , o * Obj , rawLine string , options * ObjParserOptions ) (bool , error ) {
660
+ func parseLineVertex (p * objParser , rawLine string , options * ObjParserOptions ) (bool , error ) {
661
661
line := strings .TrimSpace (rawLine )
662
662
663
663
p .lineBuf = append (p .lineBuf , line ) // save line for 2nd pass
@@ -721,7 +721,7 @@ func parseLineVertex(p *objParser, o *Obj, rawLine string, options *ObjParserOpt
721
721
return ErrNonFatal , nil
722
722
}
723
723
724
- func scanLines (p * objParser , o * Obj , reader StringReader , options * ObjParserOptions ) (bool , error ) {
724
+ func scanLines (p * objParser , o * Obj , options * ObjParserOptions ) (bool , error ) {
725
725
726
726
p .currGroup = o .newGroup ("" , "" , 0 , 0 )
727
727
0 commit comments