visualize

package
v0.0.0-...-b5aa40e Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// VisualCh is used to determine if
	// this process is currently visualizing anything.
	// if this is nil, the program will not attempt to
	// send visuals.
	VisualCh chan *Visual
	// HighlightColor is the color that (right now)
	// will be assigned to every Visual generated.
	HighlightColor = color.RGBA{255, 255, 255, 255}
	// HighlightLayer is the layer that (right now)
	// will be assigned to every Visual generated.
	HighlightLayer = 10
	// Default color sets
	AddColor       = color.RGBA{0, 255, 0, 255}
	RemoveColor    = color.RGBA{255, 0, 0, 255}
	CheckFaceColor = color.RGBA{0, 0, 128, 128}
	FoundColor     = color.RGBA{255, 255, 255, 255}
	CheckLineColor = color.RGBA{128, 128, 128, 128}
	AddFaceColor   = color.RGBA{0, 128, 0, 128}
)

Functions

func DrawFace

func DrawFace(f *dcel.Face)

DrawFace converts a face into a polygon, then draws it as a polygon.

func DrawLine

func DrawLine(p1, p2 geom.D2)

DrawLine sends a line instruction to the Visual Channel

func DrawPoly

func DrawPoly(ps []physics.Vector)

DrawPoly sends a polygon made up of ps (assumed convex) to the visual channel

func DrawVerticalLine

func DrawVerticalLine(p geom.D2)

DrawVerticalLine sends a line extending through the screen vertically to the visual channel at a given point

Types

type Visual

type Visual struct {
	render.Renderable
	Layer int
}

Visual is a renderable with attached instructions to be given to a renderable at time of drawing.

Jump to

Keyboard shortcuts

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