camera

package
v0.0.0-...-7d0236b Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_RECUSRION_DEPTH = 5

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	Hsize       uint32
	Vsize       uint32
	FieldOfView float64

	PixelSize  float64
	HalfWidth  float64
	HalfHeight float64
	// contains filtered or unexported fields
}

func New

func New(hsize, vsize uint32, fieldOfView float64) Camera

func (*Camera) RayForPixel

func (c *Camera) RayForPixel(px, py float64) ray.Ray

func (*Camera) Render

func (c *Camera) Render(w intersection.World) canvas.Canvas

func (*Camera) SetTransform

func (c *Camera) SetTransform(transform matrix.Mat44)

Jump to

Keyboard shortcuts

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