Skip to content
gwob - Pure Go Golang parser for Wavefront .OBJ 3D geometry file format
Branch: master
Clone or download
udhos
udhos Fix comment.
Latest commit b6d4421 Apr 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
LICENSE
README.md
build.sh
go.mod
obj.go
obj_test.go
parser.go

README.md

license GoDoc Go Report Card

gwob

gwob - Pure Go Golang parser for Wavefront .OBJ 3D geometry file format

Install

Install with Go Modules (Go 1.11 or higher)

git clone https://github.com/udhos/gwob
cd gwob
go install

Install without Go Modules (Go before 1.11)

go get github.com/udhos/gwob
cd ~/go/src/github.com/udhos/gwob
go install github.com/udhos/gwob

Usage

Import the package in your Go program:

import "github.com/udhos/gwob"

Example:

// Error handling omitted for simplicity.

import "github.com/udhos/gwob"

inputObj, errOpen := os.Open("gopher.obj") // open OBJ file

options := &gwob.ObjParserOptions{} // parser options

o, errObj := gwob.NewObjFromReader(fileObj, inputObj, options) // parse/load OBJ

// Scan OBJ groups
for _, g := range o.Groups {
    // ...
}

Example

Run the example:

cd example
go run main.go

See directory example.

Documentation

See the GoDoc documentation.

You can’t perform that action at this time.