stl

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(fp string) (*modeling.Mesh, error)

func ReadMesh

func ReadMesh(in io.Reader) (*modeling.Mesh, error)

func Save

func Save(fp string, m modeling.Mesh) error

func Write

func Write(out io.Writer, bin Binary) error

func WriteMesh

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

Types

type Artifact added in v0.21.3

type Artifact struct {
	Mesh modeling.Mesh
}

func (Artifact) Mime added in v0.21.3

func (Artifact) Mime() string

func (Artifact) Write added in v0.21.3

func (sa Artifact) Write(w io.Writer) error

type Binary

type Binary struct {
	Header    Header
	Triangles []Triangle
}

func Read

func Read(in io.Reader) (*Binary, error)
type Header [80]byte

type ManifestNode added in v0.25.0

type ManifestNode struct {
	Mesh nodes.Output[modeling.Mesh]
}

func (ManifestNode) Out added in v0.32.0

type ReadNode added in v0.21.3

type ReadNode struct {
	Data nodes.Output[[]byte]
}

func (ReadNode) Out added in v0.32.0

func (gad ReadNode) Out(out *nodes.StructOutput[modeling.Mesh])

type Triangle

type Triangle struct {
	Normal    Vec
	Vertex1   Vec
	Vertex2   Vec
	Vertex3   Vec
	Attribute uint16
}

type Vec

type Vec struct {
	X float32
	Y float32
	Z float32
}

func (Vec) Float64

func (v Vec) Float64() vector3.Float64

func (Vec) Zero

func (v Vec) Zero() bool

Jump to

Keyboard shortcuts

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