dui

package
v0.0.0-...-c4a1d86 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package dui implements a UI usefull for debugging a 2D physics engine

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DUI

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

func New

func New(title string) *DUI

func (*DUI) Draw

func (ui *DUI) Draw() (err error)

Draw blocks and starts drawing for ever.

func (*DUI) SetBounds

func (ui *DUI) SetBounds(bnd v2d.Rect)

SetBounds sets the simulation region that should be shown.

func (*DUI) SetMeasure

func (ui *DUI) SetMeasure(measure string, value float64)

SetMeasure registers a measure (if the string measure is new) or updates an previously registered one that should be shown to the user.

func (*DUI) SetShapes

func (ui *DUI) SetShapes(shapes [][][3]v2d.Vec)

SetShapes uses copies the data provided and will use that for displaying. Not that the argument will not be retained after the call returns. It is thus safe for the caller to re-use the same buffer for multiple frames.

Directories

Path Synopsis
Command example shows a simple example of using dui to display debug info for a 2D physics simulation.
Command example shows a simple example of using dui to display debug info for a 2D physics simulation.

Jump to

Keyboard shortcuts

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