obj

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorString

func ColorString(color color.Color) string

func ReadMaterials

func ReadMaterials(in io.Reader) ([]modeling.Material, error)

func Save

func Save(objPath string, meshToSave modeling.Mesh) error

Save writes the mesh to the path specified in OBJ format, optionally writing an additional MTL file with materials are found within the modeling.

func WriteMaterial

func WriteMaterial(mat modeling.Material, out io.Writer) error

func WriteMaterials

func WriteMaterials(m modeling.Mesh, out io.Writer) error

func WriteMesh

func WriteMesh(m modeling.Mesh, materialFile string, out io.Writer) error

func WriteMeshes added in v0.9.0

func WriteMeshes(meshes []ObjMesh, materialFile string, out io.Writer) error

Types

type ObjMesh added in v0.9.0

type ObjMesh struct {
	Name string
	Mesh modeling.Mesh
}

func Load

func Load(objPath string) ([]ObjMesh, error)

Load reads an obj file from the path specified, and optionally loads all associated metadata files the obj file might reference.

func ReadMesh

func ReadMesh(in io.Reader) ([]ObjMesh, []string, error)

Jump to

Keyboard shortcuts

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