agent

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate added in v0.2.0

func Validate(o O) bool

Types

type A

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

func New

func New(o O) *A

func (*A) AABB

func (a *A) AABB() hyperrectangle.R

func (*A) Flags

func (a *A) Flags() flags.F

func (*A) Heading

func (a *A) Heading() polar.V

func (*A) ID

func (a *A) ID() id.ID

func (*A) Mass added in v0.3.1

func (a *A) Mass() float64

func (*A) MaxAcceleration

func (a *A) MaxAcceleration() float64

func (*A) MaxAngularVelocity

func (a *A) MaxAngularVelocity() float64

func (*A) MaxVelocity

func (a *A) MaxVelocity() float64

func (*A) MoveMode added in v0.3.12

func (a *A) MoveMode() move.F

func (*A) Position

func (a *A) Position() vector.V

Position returns the current position of the agent.

External callers must not set the position via the position reference object returned here.

func (*A) Radius

func (a *A) Radius() float64

func (*A) SetHeading

func (a *A) SetHeading(v polar.V)

func (*A) SetID

func (a *A) SetID(x id.ID)

func (*A) SetMoveMode added in v0.3.12

func (a *A) SetMoveMode(f move.F)

func (*A) SetPosition

func (a *A) SetPosition(v vector.V)

func (*A) SetTargetPosition added in v0.3.2

func (a *A) SetTargetPosition(v vector.V)

func (*A) SetTargetVelocity

func (a *A) SetTargetVelocity(v vector.V)

func (*A) SetVelocity

func (a *A) SetVelocity(v vector.V)

func (*A) Size added in v0.3.12

func (a *A) Size() size.F

func (*A) TargetPosition added in v0.3.2

func (a *A) TargetPosition() vector.V

func (*A) TargetVelocity

func (a *A) TargetVelocity() vector.V

func (*A) Team added in v0.3.6

func (a *A) Team() team.F

func (*A) Velocity

func (a *A) Velocity() vector.V

type O

type O struct {
	Position           vector.V
	TargetPosition     vector.V
	Velocity           vector.V
	TargetVelocity     vector.V
	Heading            polar.V
	Radius             float64
	Mass               float64
	MaxVelocity        float64
	MaxAngularVelocity float64
	MaxAcceleration    float64
	Flags              flags.F
	Size               size.F
	Team               team.F
	Move               move.F
}

Jump to

Keyboard shortcuts

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