Versions in this module Expand all Collapse all v1 v1.0.0 May 4, 2024 Changes in this version + const ErrFatal + const ErrNonFatal + type Group struct + IndexBegin int + IndexCount int + Name string + Smooth int + Usemtl string + type Material struct + Bump string + D float32 + Illum int + Ka [3]float32 + Kd [3]float32 + Ks [3]float32 + MapD string + MapKa string + MapKd string + MapKe string + MapKs string + Name string + Ni float32 + Ns float32 + Tr float32 + type MaterialLib struct + Lib map[string]*Material + func NewMaterialLib() MaterialLib + func ReadMaterialLibFromBuf(buf []byte, options *ObjParserOptions) (MaterialLib, error) + func ReadMaterialLibFromFile(filename string, options *ObjParserOptions) (MaterialLib, error) + func ReadMaterialLibFromReader(rd io.Reader, options *ObjParserOptions) (MaterialLib, error) + func ReadMaterialLibFromStringReader(rd StringReader, options *ObjParserOptions) (MaterialLib, error) + type Obj struct + BigIndexFound bool + Coord []float32 + Groups []*Group + Indices []int + Mtllib string + NormCoordFound bool + StrideOffsetNormal int + StrideOffsetPosition int + StrideOffsetTexture int + StrideSize int + TextCoordFound bool + func NewObjFromBuf(objName string, buf []byte, options *ObjParserOptions) (*Obj, error) + func NewObjFromFile(filename string, options *ObjParserOptions) (*Obj, error) + func NewObjFromReader(objName string, rd io.Reader, options *ObjParserOptions) (*Obj, error) + func NewObjFromStringReader(objName string, rd StringReader, options *ObjParserOptions) (*Obj, error) + func NewObjFromVertex(coord []float32, indices []int) (*Obj, error) + func (o *Obj) Coord64(i int) float64 + func (o *Obj) NumberOfElements() int + func (o *Obj) ToFile(filename string) error + func (o *Obj) ToWriter(w io.Writer) error + func (o *Obj) VertexCoordinates(stride int) (float32, float32, float32) + type ObjParserOptions struct + IgnoreNormals bool + LogStats bool + Logger func(string) + type StringReader interface + ReadString func(delim byte) (string, error)