gui

package
v0.0.0-...-dd13743 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Position vect.Vect
	Radius   float32
	Mass     vect.Float
	Velocity vect.Vect
	Color    color.Color
}

type CallbackFunc

type CallbackFunc func(ui *UI)

type UI

type UI struct {
	X        float64
	Y        float64
	Field    *field.Field
	Stats    stats.Reporter
	Status   status.Reporter
	Callback CallbackFunc
	// contains filtered or unexported fields
}

func NewUI

func NewUI(name string, X, Y float64) (ui *UI)

func (*UI) AddManual

func (ui *UI) AddManual(position1 pixel.Vec, position2 pixel.Vec, radius float32, mass float32)

func (*UI) Load

func (ui *UI) Load(bodies []Body)

func (*UI) ProcessEvents

func (ui *UI) ProcessEvents(win *pixelgl.Window)

func (*UI) RunGUI

func (ui *UI) RunGUI()

func (*UI) SetTime

func (ui *UI) SetTime(factor int)

SetTime sets the speedup factor for the simulation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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