objloader

package
v0.0.0-...-c29c7b8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadObj

func LoadObj(dir fs.FS, obj string) ([]Model, []Material, error)

Types

type Material

type Material struct {
	Name              string
	Ambient           [3]float32
	Diffuse           [3]float32
	Specular          [3]float32
	Shininess         float32
	Dissolve          float32
	OpticalDensity    float32
	AmbientTexture    string
	DiffuseTexture    string
	SpecularTexture   string
	NormalTexture     string
	ShininessTexture  string
	DissolveTexture   string
	IlluminationModel uint8
}

type Model

type Model struct {
	Name          string
	MaterialName  string
	Vertices      [][3]float32
	TextureCoords [][3]float32
	Normals       [][3]float32
	Indices       []uint32
}

Jump to

Keyboard shortcuts

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