fov

package
v0.0.0-...-e6da677 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2013 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fov implements a field-of-view algorithm for manifold maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fov

type Fov struct {
	// contains filtered or unexported fields
}

func New

func New(blocksSightFn func(space.Location) bool,
	markSeenFn func(image.Point, space.Location),
	mf *space.Manifold) *Fov

func (*Fov) Run

func (f *Fov) Run(origin space.Location, radius int)

Run runs a field-of-view computation up to radius distance from the given origin, and calls the fov object's markSeenFn callback for all locations it finds visible. The blocksSightFn callback of fov object is used to determine locations that block visibility.

Jump to

Keyboard shortcuts

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