tracer

package
v0.0.0-...-a70e9d4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Width  int
	Height int
	// contains filtered or unexported fields
}

func NewImage

func NewImage(width, height int) *Image

func (*Image) Set

func (i *Image) Set(x, y int, c *Vec3)

func (*Image) WriteToFile

func (i *Image) WriteToFile(path string) error

type Vec3

type Vec3 struct {
	X float64
	Y float64
	Z float64
}

func NewVec3

func NewVec3(x, y, z float64) *Vec3

func (*Vec3) Add

func (v *Vec3) Add(o *Vec3) *Vec3

func (*Vec3) Cross

func (v *Vec3) Cross(o *Vec3) *Vec3

func (*Vec3) Div

func (v *Vec3) Div(s float64) *Vec3

func (*Vec3) Dot

func (v *Vec3) Dot(o *Vec3) float64

func (*Vec3) Length

func (v *Vec3) Length() float64

func (*Vec3) LengthSquared

func (v *Vec3) LengthSquared() float64

func (*Vec3) Mul

func (v *Vec3) Mul(s float64) *Vec3

func (*Vec3) Sub

func (v *Vec3) Sub(o *Vec3) *Vec3

func (*Vec3) Unit

func (v *Vec3) Unit() *Vec3

Jump to

Keyboard shortcuts

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