MCPcopy Create free account
hub / github.com/cogentcore/core / Decoder

Struct Decoder

xyz/io/obj/obj.go:40–54  ·  view source on GitHub ↗

Decoder contains all decoded data from the obj and mtl files. It also implements the xyz.Decoder interface and an instance is registered to handle .obj files.

Source from the content-addressed store, hash-verified

38// It also implements the xyz.Decoder interface and an instance
39// is registered to handle .obj files.
40type Decoder struct {
41 FSys fs.FS // filesystem, used for all loading
42 Objfile string // .obj filename within FSys
43 Objects []Object // decoded objects
44 Matlib string // name of the material lib
45 Materials map[string]*Material // maps material name to object
46 Vertices math32.ArrayF32 // vertices positions array
47 Normals math32.ArrayF32 // vertices normals
48 Uvs math32.ArrayF32 // vertices texture coordinates
49 Warnings []string // warning messages
50 line uint // current line number
51 objCurrent *Object // current object
52 matCurrent *Material // current material
53 smoothCurrent bool // current smooth state
54}
55
56func (dec *Decoder) New() xyz.Decoder {
57 di := new(Decoder)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected