vitro.plane
Class PhysicsActor
java.lang.Object
vitro.Actor
vitro.plane.PlaneActor
vitro.plane.PhysicsActor
public class PhysicsActor
- extends PlaneActor
More realistic would be to keep tabs on momentum, so that
changes in mass will be appropriately expressed. That change
shouldn't be a large refactor though, so I'm keeping this
simplistic approach for now.
Method Summary |
Set<Action> |
actions()
A collection of Actions that are possible for this Actor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mass
public final double mass
velocity
public Vector2 velocity
PhysicsActor
public PhysicsActor(Plane model,
double mass,
Vector2 initial)
PhysicsActor
public PhysicsActor(Plane model,
double mass)
actions
public Set<Action> actions()
- Description copied from class:
Actor
- A collection of Actions that are possible for this Actor.
In a simulation round, each Actor will have the opportunity
to perform a single Action. If this method returns an
empty set (the default), no action will be taken.
If this method returns a single action, it will always
be taken. Otherwise, it is the responsibility of the
Controller to determine which action (if any) is taken.
Controllers can associate Agents with Actors to act as
decision-making 'filters'.
In general, these Actions should be thought of as a
collection of Actions that are 'physically possible'
given the current state of the Model.
- Overrides:
actions
in class Actor
- Returns:
- a Set of Actions that this Actor can take.