photon

package module
v0.0.0-...-074b901 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

README

photon

A Go library for reading and writing .photon and .cbddlp files.

Documentation

Index

Constants

View Source
const (
	FLAG_SET_PIXELS = 0x80
)

Variables

View Source
var (
	PixelSetColor   = color.RGBA{255, 255, 255, 255}
	PixelUnsetColor = color.RGBA{0, 0, 0, 255}
)

Functions

func CombineRGB5515

func CombineRGB5515(r uint8, g uint8, b uint8, isFill bool) uint16

func DebugPrint

func DebugPrint(rdr io.ReadSeeker) error

Prototyping/ debug function. Dont even try to use.

func SplitRGB5515

func SplitRGB5515(x uint16) (r uint8, g uint8, b uint8, isFill bool)

func U16ToU8Slice

func U16ToU8Slice(in []uint16) []uint8

Types

type Layer

type Layer struct {
	RawData         []byte
	AbsoluteHeight  float32
	ExposureTime    float32
	PerLayerOffTime float32
}

type PhotonFile

type PhotonFile struct {
	PlateX             float32
	PlateY             float32
	PlateZ             float32
	LayerThickness     float32
	NormalExposureTime float32
	BottomExposureTime float32
	OffTime            float32
	BottomLayers       uint32
	ScreenHeight       uint32
	ScreenWidth        uint32
	LightCuringType    uint32 // ProjectionType

	PreviewImage   *image.RGBA
	ThumbnailImage *image.RGBA

	Layers []Layer
}

func Decode

func Decode(rdr io.ReadSeeker) (*PhotonFile, error)

func (*PhotonFile) EncodeTo

func (pf *PhotonFile) EncodeTo(writer io.Writer) error

Encodes the data in .photon / .cbddlp file format to the given writer.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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