acceleration

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GravityDirection

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

GravityDirection represents the solution for an acceleration that applies a constant force in a specific direction.

func NewGravityDirection

func NewGravityDirection() *GravityDirection

NewGravityDirection creates a new GravityDirection acceleration that applies a constant force in a specific direction.

func (*GravityDirection) Acceleration

func (d *GravityDirection) Acceleration() float64

Acceleration returns the acceleration of the gravity force.

func (*GravityDirection) ApplyAcceleration

func (d *GravityDirection) ApplyAcceleration(ctx solver.AccelerationContext)

func (*GravityDirection) Direction

func (d *GravityDirection) Direction() dprec.Vec3

Direction returns the direction of the gravity force.

func (*GravityDirection) SetAcceleration

func (d *GravityDirection) SetAcceleration(acceleration float64) *GravityDirection

SetAcceleration changes the acceleration of the gravity force.

func (*GravityDirection) SetDirection

func (d *GravityDirection) SetDirection(direction dprec.Vec3) *GravityDirection

SetDirection changes the direction of the gravity force.

type GravityPosition

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

GravityPosition represents the solution for an acceleration that applies a constant force towards a specific position.

func NewGravityPosition

func NewGravityPosition() *GravityPosition

NewGravityPosition creates a new GravityPosition acceleration that applies a constant force towards a specific position.

func (*GravityPosition) Acceleration

func (d *GravityPosition) Acceleration() float64

Acceleration returns the acceleration of the gravity force.

func (*GravityPosition) ApplyAcceleration

func (d *GravityPosition) ApplyAcceleration(ctx solver.AccelerationContext)

func (*GravityPosition) Position

func (d *GravityPosition) Position() dprec.Vec3

Position returns the position of the gravity force.

func (*GravityPosition) SetAcceleration

func (d *GravityPosition) SetAcceleration(acceleration float64) *GravityPosition

SetAcceleration changes the acceleration of the gravity force.

func (*GravityPosition) SetPosition

func (d *GravityPosition) SetPosition(position dprec.Vec3) *GravityPosition

SetPosition changes the position of the gravity force.

Jump to

Keyboard shortcuts

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