collision

package
v0.0.0-...-da99c14 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SoccerBallImage *ebiten.Image
	// Screen Resolution
	ScreenWidth  = 1600
	ScreenHeight = 900
	// Starting velocity for balls
	MinV0 float64 = -50
	MaxV0 float64 = 50
)

Simulation variables

Functions

func DrawScenery

func DrawScenery(screen *ebiten.Image)

DrawScenery is a helper function to draw background

func Edge

func Edge(b *ball.Ball)

Edge checks if ball reached the boundary

func Goal

func Goal(b *ball.Ball)

Goal checks if ball reached a goal

func StartValues

func StartValues(nballs int) error

StartValues set starting position and velocity for a slice of balls Positions spread in a square and velocity is random

func Timestep

func Timestep(b *ball.Ball)

Timestep is a helper function to perform a timestep with position and velocity updates

Types

This section is empty.

Jump to

Keyboard shortcuts

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