physsystem

package
v0.0.0-...-e7326f8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PhysSystem

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

An interface over Box2D that defines all the physics in the scene.

func New

func New() *PhysSystem

Returns a new PhysSystem instance.

func (*PhysSystem) GetB2World

func (ps *PhysSystem) GetB2World() *box2d.B2World

Returns Box2D world.

func (*PhysSystem) NewB2Body

func (ps *PhysSystem) NewB2Body(def *box2d.B2BodyDef) *box2d.B2Body

Returns new Box2D body that created in the Box2D world.

func (*PhysSystem) PhysUpdate

func (ps *PhysSystem) PhysUpdate(gb interfaces.IGameBase) error

func (*PhysSystem) RegisterRigidbody

func (ps *PhysSystem) RegisterRigidbody(rb interfaces.IRigidbody)

Registers the rigidbody in the rigidbodies registry. All the non-registered rigidbodies wouldn't be calculated.

func (*PhysSystem) UnregisterRigidbody

func (ps *PhysSystem) UnregisterRigidbody(rb interfaces.IRigidbody)

Unregisters the rigidbody.

Jump to

Keyboard shortcuts

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