stl

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 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 ArtifactNode added in v0.21.3

type ArtifactNodeData added in v0.21.3

type ArtifactNodeData struct {
	In nodes.NodeOutput[modeling.Mesh]
}

func (ArtifactNodeData) Process added in v0.21.3

func (pn ArtifactNodeData) Process() (artifact.Artifact, error)

type Binary

type Binary struct {
	Header    Header
	Triangles []Triangle
}

func Read

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

type ReadNode added in v0.21.3

type ReadNode = nodes.Struct[modeling.Mesh, ReadNodeData]

type ReadNodeData added in v0.21.3

type ReadNodeData struct {
	Data nodes.NodeOutput[[]byte]
}

func (ReadNodeData) Process added in v0.21.3

func (gad ReadNodeData) Process() (modeling.Mesh, error)

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