MCPcopy
hub / github.com/g3n/engine / decVertices

Method decVertices

loader/collada/library_geometries.go:348–368  ·  view source on GitHub ↗
(start xml.StartElement, mesh *Mesh)

Source from the content-addressed store, hash-verified

346}
347
348func (d *Decoder) decVertices(start xml.StartElement, mesh *Mesh) error {
349
350 mesh.Vertices.Id = findAttrib(start, "id").Value
351 mesh.Vertices.Name = findAttrib(start, "name").Value
352
353 for {
354 // Get next child
355 child, _, err := d.decNextChild(start)
356 if err != nil || child.Name.Local == "" {
357 return err
358 }
359 // input
360 if child.Name.Local == "input" {
361 inp, err := d.decInput(child)
362 if err != nil {
363 return err
364 }
365 mesh.Vertices.Input = append(mesh.Vertices.Input, inp)
366 }
367 }
368}
369
370func (d *Decoder) decInput(start xml.StartElement) (Input, error) {
371

Callers 1

decMeshMethod · 0.95

Calls 3

decNextChildMethod · 0.95
decInputMethod · 0.95
findAttribFunction · 0.85

Tested by

no test coverage detected