physics

package
v0.0.0-...-198d64f Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DragGenerator

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

func (DragGenerator) Apply

func (self DragGenerator) Apply(p *Particle3d)

type ForceGenerator

type ForceGenerator interface {
	Apply(particle *Particle3d)
}

type ForceGeneratorFunc

type ForceGeneratorFunc func(*Particle3d)

func (ForceGeneratorFunc) Apply

func (self ForceGeneratorFunc) Apply(p *Particle3d)

type GravityGenerator

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

func (GravityGenerator) Apply

func (self GravityGenerator) Apply(p *Particle3d)

type Particle3d

type Particle3d struct {
	Pos loops.Vec3
	Vel loops.Vec3
	// contains filtered or unexported fields
}

func NewParticle3d

func NewParticle3d(mass, x, y, z float64) *Particle3d

func (*Particle3d) ApplyForce

func (self *Particle3d) ApplyForce(force loops.Vec3)

func (*Particle3d) Mass

func (self *Particle3d) Mass() float64

func (*Particle3d) SetMass

func (self *Particle3d) SetMass(mass float64)

func (*Particle3d) Update

func (self *Particle3d) Update(dt float64)

Jump to

Keyboard shortcuts

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