T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic abstract class ProximityBase<T extends com.badlogic.gdx.math.Vector<T>> extends java.lang.Object implements Proximity<T>
ProximityBase is the base class for any concrete proximity based on an iterable collection of agents.Proximity.ProximityCallback<T extends com.badlogic.gdx.math.Vector<T>>| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Iterable<? extends Steerable<T>> |
agents
The collection of the agents handled by this proximity.
|
protected Steerable<T> |
owner
The owner of this proximity.
|
| Constructor and Description |
|---|
ProximityBase(Steerable<T> owner,
java.lang.Iterable<? extends Steerable<T>> agents)
Creates a
ProximityBase for the specified owner and list of agents. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<? extends Steerable<T>> |
getAgents()
Returns the the agents that represent potential neighbors.
|
Steerable<T> |
getOwner()
Returns the owner of this proximity.
|
void |
setAgents(java.lang.Iterable<Steerable<T>> agents)
Sets the agents that represent potential neighbors.
|
void |
setOwner(Steerable<T> owner)
Sets the owner of this proximity.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindNeighborsprotected Steerable<T extends com.badlogic.gdx.math.Vector<T>> owner
protected java.lang.Iterable<? extends Steerable<T extends com.badlogic.gdx.math.Vector<T>>> agents
Note that, being this field of type Iterable, you can either use java or libgdx collections. See
https://github.com/libgdx/gdx-ai/issues/65
public Steerable<T> getOwner()
Proximitypublic void setOwner(Steerable<T> owner)
Proximitypublic java.lang.Iterable<? extends Steerable<T>> getAgents()