Class Agent

java.lang.Object
com.eco.bio7.simulation.Agent

public class Agent extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    The 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).
    double
    The 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).
    double
    The size of the image or the height of the model (0: the diameter of the sphere).
    double
    The position in the box of the model (z: the height above the floor).
    double
    The position in the box of the model (z: the height above the floor).
    double
    The position in the box of the model (z: the height above the floor).
  • Constructor Summary

    Constructors
    Constructor
    Description
    An agent at 0, 0, 0.
    Agent(double x, double y, double z)
    An agent at the position.
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      public double x
      The position in the box of the model (z: the height above the floor).
    • y

      public double y
      The position in the box of the model (z: the height above the floor).
    • z

      public double z
      The position in the box of the model (z: the height above the floor).
    • color

      public String color
      The color (e.g., "#d62728"; null: the color of the model, agentColor).
    • image

      public String image
      An image (loaded with loadImage) instead of the sphere: a billboard (null: none).
    • model

      public String model
      A 3D model (glTF, loaded with loadModel) instead of the sphere (null: none).
    • animation

      public String animation
      The animation of the model (its name or number, null: the first animation, "none": still).
    • heading

      public double heading
      The heading in degrees (0 the direction of y, clockwise; NaN: the direction of the last movement).
    • size

      public double size
      The 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.