obj

package
v0.0.0-...-1b23d78 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package obj provide interface to load OBJ format 3D models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
	Vert     []float32 // interlacing position, texcoord, normal
	Smooth   int       // smoothing group
}

GroupData is vertex group

type ModelData

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

ModelData is Wave Front MTL 3d model

func Parse

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

Parse a obj format 3D 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