agent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A

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

func New

func New(o O) *A

func (*A) G

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

func (*A) P

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

func (*A) R

func (a *A) R() float64

func (*A) S

func (a *A) S() float64

S returns the maximum speed of the agent. We are setting the agent speed to be invariant -- this means agents can still move to avoid other agents even after arriving at the destination.

func (*A) SetP

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

func (*A) SetV

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

func (*A) T

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

T returns the target velocity vector of the agent. In the demos provided, we are setting the target to stop when "close enough" to the actual goal to remove end-state jitter while preserving the flexibility agent to still navigate to avoid collisions.

func (*A) V

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

type O

type O struct {
	P vector.V
	G vector.V
	S float64
	R float64
}

Jump to

Keyboard shortcuts

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