Constructor
new AgentList(model, …args)
| Name | Type | Attributes | Description |
|---|---|---|---|
model | Model | The Model this AgentList belongs to | |
args | any | <repeatable> | The arguments passed to super |
- Source
Methods
inCone(agent, radius, coneAngle, heading, meToo)
As above, but also limited to the angle coneAngle around an angle from object agent. coneAngle and direction in radians.
| Name | Type | Default | Description |
|---|---|---|---|
agent | Agent | ||
radius | number | ||
coneAngle | number | ||
heading | number | ||
meToo | boolean | false |
- Source
An AgentList of agents within the angle. Include agent if metoo
inRadius(agent, radius, meToo)
Return all agents in AgentArray within radius from given agent.
| Name | Type | Default | Description |
|---|---|---|---|
agent | Agent | ||
radius | number | ||
meToo | boolean | false |
- Source
An AgentList of agents within the radius. Include agent if metoo
inRect(agent, dx, dy, meToo)
Return all agents within rectangle from given agent. dx & dy are (float) half width/height of rect
| Name | Type | Default | Description |
|---|---|---|---|
agent | Agent | ||
dx | number | ||
dy | number | ||
meToo | boolean | false |
- Source
An AgentList of agents within the rect. Include agent if metoo