wfobj

package
v0.0.0-...-944e809 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package wfobj provide interface to load Wave Front 3d models and materials

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMtl

func ParseMtl(r io.Reader, filename string) (ms map[string]*glman.MtlInfo, err error)

ParseMtl parse mtl format material file.

Types

type GroupData

type GroupData struct {
	Name     string
	Material string
	SzPos    int       // number components of position per vertex
	SzTC     int       // number components of texcoord per vertex
	SzNorm   int       // number components of nromal per vertex
	V        []float32 // interlacing position, texcoord, normal
	S        int
}

GroupData is vertex group

func (GroupData) String

func (g GroupData) String() string

type ModelData

type ModelData struct {
	Name    string
	MtlLibs []string
	Groups  []*GroupData
}

ModelData is Wave Front MTL 3d model, not loaded into GPU

func ParseObj

func ParseObj(r io.Reader, filename string) (m *ModelData, err error)

ParseObj parse obj format model file.

func (ModelData) String

func (m ModelData) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL