mesh

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CubeFaceNone CubeFaces = 0
	CubeFaceEast           = 1 << iota
	CubeFaceWest
	CubeFaceTop
	CubeFaceDown
	CubeFaceNorth
	CubeFaceSouth
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CubeFaces

type CubeFaces uint8

type Mesh

type Mesh struct {
	Vertices []Vertex
}

func Cuboid

func Cuboid(x1, y1, z1, x2, y2, z2 float64, hiddenFaces CubeFaces) []Mesh

func NewMesh

func NewMesh() Mesh

type Model

type Model struct {
	Meshes []Mesh
}

func Cube

func Cube(hiddenFaces CubeFaces) *Model

func LoadOBJ

func LoadOBJ(path string) (Model, error)

func NewModel

func NewModel() Model

type Triplet

type Triplet struct {
	// contains filtered or unexported fields
}

type Vertex

type Vertex struct {
	Position lm.Vector3
	Texcoord lm.Vector2
	Normal   lm.Vector3
}

Jump to

Keyboard shortcuts

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