physics

package
v0.0.0-...-bf3ccf0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClippingShape

type ClippingShape interface {
	GetBoundingBox() algebra.Rectangle
}

type Locatable

type Locatable interface {
	GetPosition() algebra.Vector2
}

type Physical

type Physical interface {
	Tick(dt float64)
}

type Positionable

type Positionable interface {
	Locatable
	MoveTo(v algebra.Vector2)
}

type QuadKey

type QuadKey struct {
	Pnt    interface{}
	Bounds algebra.Rectangle
}

type QuadNode

type QuadNode struct {
	Children []*QuadNode
	// contains filtered or unexported fields
}

func (*QuadNode) ClippingCandidates

func (root *QuadNode) ClippingCandidates(k *QuadKey) <-chan *QuadKey

func (*QuadNode) ClippingCandidatesAt

func (root *QuadNode) ClippingCandidatesAt(bounds algebra.Rectangle) <-chan *QuadKey

func (*QuadNode) Draw

func (root *QuadNode) Draw(win *pixelgl.Window)

func (*QuadNode) InsertAt

func (root *QuadNode) InsertAt(pnt interface{}, bounds algebra.Rectangle) (k *QuadKey)

func (*QuadNode) Remove

func (root *QuadNode) Remove(k *QuadKey) error

type QuadTree

type QuadTree interface {
	InsertAt(pnt interface{}, bounds algebra.Rectangle) *QuadKey
	Remove(k *QuadKey) error
	ClippingCandidates(k *QuadKey) <-chan *QuadKey
	ClippingCandidatesAt(bounds algebra.Rectangle) <-chan *QuadKey
	gfx.Drawable
	// contains filtered or unexported methods
}

func NewQuadTree

func NewQuadTree(width, height float64) QuadTree

type SolidBody

type SolidBody interface {
	ApplyImpulse(p algebra.Vector2)
}

Jump to

Keyboard shortcuts

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