phys

package
v0.0.0-...-bdb03cc Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 3 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 {
	Name string

	Collidable Collidable
	// contains filtered or unexported fields
}

func (*Body) Draw

func (body *Body) Draw()

func (*Body) GetPoints

func (body *Body) GetPoints() []float32

func (*Body) Move

func (body *Body) Move(x, y, rot, scale float32) []*Body

func (*Body) Remove

func (body *Body) Remove()

type Cell

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

type Collidable

type Collidable interface {
	Destroy(force bool)
}

type Matrix

type Matrix [6]float32

type World

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

func NewWorld

func NewWorld(width, height, cell_size float32) *World

func (*World) AddBody

func (world *World) AddBody(collidable Collidable, name string, x, y, scale float32, points []float32) *Body

func (*World) CellAt

func (world *World) CellAt(x, y float32) *Cell

func (*World) DrawGrid

func (world *World) DrawGrid()

Jump to

Keyboard shortcuts

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