visualizer

package
v0.0.0-...-f868c53 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCREEN_WIDTH  = 1500
	SCREEN_HEIGHT = 1000
)

Variables

This section is empty.

Functions

func StartGUI

func StartGUI(s *simulator.Simulator, record bool, speedFactor float64, scenarioFilepath string)

Starts the GUI using the given simulator, with the given speed factor. If record is true, the simulation is recorded If scenarioFilepath is an empty string, no obstacles are rendered

Types

type LineStyle

type LineStyle struct {
	Red       int
	Green     int
	Blue      int
	TempColor color.Color
	MainColor color.Color
	Width     int
	FadeRate  float64
}

func DefaultLineStyle

func DefaultLineStyle() *LineStyle

func NewLineStyle

func NewLineStyle(mainColor color.Color, tempColor color.Color, width int, fadeRate float64) *LineStyle

type NodeStyle

type NodeStyle struct {
	Red       int
	Green     int
	Blue      int
	MainColor color.Color
	TempColor color.Color
	Size      int
	FadeRate  float64
}

func NewNodeStyle

func NewNodeStyle(mainColor color.Color, tempColor color.Color, fadeRate float64) *NodeStyle

type Visualizer

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

func NewVisualizer

func NewVisualizer(sim *simulator.Simulator, record bool, speedFactor float64, drawObstacles bool) *Visualizer

func (*Visualizer) Draw

func (v *Visualizer) Draw(screen *ebiten.Image)

func (*Visualizer) Layout

func (v *Visualizer) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*Visualizer) Update

func (v *Visualizer) Update() error

Jump to

Keyboard shortcuts

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