raytracer

package
v0.0.0-...-1c48c43 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package raytracer provides an implementation for tracing a single ray into the scene

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Raytracer

type Raytracer struct {
	Scene  *scene.Scene
	Random *random.Random
}

Raytracer represents a single rendering unit

func (*Raytracer) RandomGen

func (r *Raytracer) RandomGen() *random.Random

RandomGen returns the raytracer's random generator

func (*Raytracer) Raytrace

func (r *Raytracer) Raytrace(incoming *ray.Ray) *hdrcolour.Colour

Raytrace returns the colour obtained by tracing the given ray

func (*Raytracer) Sample

func (r *Raytracer) Sample(image *hdrimage.Image)

Sample adds another sample to the image by changing it.

Jump to

Keyboard shortcuts

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