Class Agent
java.lang.Object
com.eco.bio7.simulation.Agent
An agent of an
AgentModel: a position (x, y, z in the units of the
box of the model, z is the height) and an optional color (e.g., "#d62728",
null: the color of the model). Subclasses add their own fields (e.g., a
velocity) and methods.-
Field Summary
FieldsModifier and TypeFieldDescriptionThe animation of the model (its name or number, null: the first animation, "none": still).The color (e.g., "#d62728"; null: the color of the model, agentColor).doubleThe heading in degrees (0 the direction of y, clockwise; NaN: the direction of the last movement).An image (loaded with loadImage) instead of the sphere: a billboard (null: none).A 3D model (glTF, loaded with loadModel) instead of the sphere (null: none).doubleThe size of the image or the height of the model (0: the diameter of the sphere).doubleThe position in the box of the model (z: the height above the floor).doubleThe position in the box of the model (z: the height above the floor).doubleThe position in the box of the model (z: the height above the floor). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
public double xThe position in the box of the model (z: the height above the floor). -
y
public double yThe position in the box of the model (z: the height above the floor). -
z
public double zThe position in the box of the model (z: the height above the floor). -
color
The color (e.g., "#d62728"; null: the color of the model, agentColor). -
image
An image (loaded with loadImage) instead of the sphere: a billboard (null: none). -
model
A 3D model (glTF, loaded with loadModel) instead of the sphere (null: none). -
animation
The animation of the model (its name or number, null: the first animation, "none": still). -
heading
public double headingThe heading in degrees (0 the direction of y, clockwise; NaN: the direction of the last movement). -
size
public double sizeThe size of the image or the height of the model (0: the diameter of the sphere).
-
-
Constructor Details
-
Agent
public Agent()An agent at 0, 0, 0. -
Agent
public Agent(double x, double y, double z) An agent at the position.
-