stl

package
v0.0.0-...-02d3639 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line struct {
	End [2]Point
}

A Line is a line segment in 3D space, denoted by two Points

type Point

type Point struct {
	X, Y, Z float32
}

A Point is a point in 3D space.

func (Point) Equals

func (p1 Point) Equals(p2 Point) bool

type Scene

type Scene struct {
	Header    [80]byte
	Triangles []Triangle
	Bounds    Subspace
}

A Scene holds all of the contents of an STL file, as well as derived values.

func Decode

func Decode(r io.Reader) (s Scene, err error)

Decode reads an entire STL file from a Reader, returning a Scene.

type Subspace

type Subspace struct {
	Min Point
	Max Point
}

A Region is a region of the coordinate space from Min to Max

type Triangle

type Triangle struct {
	Normal Vector
	Vertex [3]Point
	Attr   uint16
}

A Triangle is a triangle in 3D space, denoted by three Points. The "outside" of the triangle is denoted by its normal vector.

type Vector

type Vector struct {
	X, Y, Z float32
}

func (Vector) Abs

func (v Vector) Abs() float32

func (Vector) IsNormal

func (v Vector) IsNormal() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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