utils

package
v0.0.0-...-5ed2699 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateImage

func CreateImage(pixels []uint32, width int, height int) *image.NRGBA

func LoadWorld

func LoadWorld(file string) (*engine.World, error)

func SaveImage

func SaveImage(pixels []uint32, options Options) (error, bool)

SaveImage saves the image (if requested) to a file in png format

Types

type Options

type Options struct {
	Width        int    // width in pixel
	Height       int    // height in pixel
	RaysPerPixel int    // number of rays per pixel
	Input        string // path to file for world definitionin in json format
	Output       string // path to file for saving
	Seed         int64  // seed for random number generator
	CPU          int    // number of CPU to use
}

Options defines all the command line options available (all have a default value)

Jump to

Keyboard shortcuts

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