public class DisplacementDeltaManager extends Object
| Constructor and Description |
|---|
DisplacementDeltaManager(Vector2D initialPosition)
Creates a new Displacement Delta Manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPotentialDisplacementDelta(DisplacementDelta delta)
Adds a displacement delta.
|
Vector2D |
calculateTotalDisplacement()
Calculates the total displacement resulting from the potential deltas and sets the result as the next position.
|
void |
clearPotentialDisplacementDeltas()
Clears all potential displacement deltas.
|
Vector2D |
getCurrentPosition()
Returns the current position.
|
Vector2D |
getNextPosition()
Returns the next position.
|
DisplacementDelta |
getPotentialDisplacementDelta(DisplacementBasedModule module)
Returns a specific delta applied by the given module.
|
List<DisplacementDelta> |
getPotentialDisplacementDeltas()
Returns the potential displacement deltas.
|
void |
resetNextPosition()
Resets the next position to the current position.
|
void |
updatePosition()
Sets the current position to the next position.
|
public DisplacementDeltaManager(Vector2D initialPosition)
initialPosition - The initial positionpublic Vector2D getCurrentPosition()
public List<DisplacementDelta> getPotentialDisplacementDeltas()
public DisplacementDelta getPotentialDisplacementDelta(DisplacementBasedModule module)
module - The module.public void addPotentialDisplacementDelta(DisplacementDelta delta)
delta - The displacement delta.public void clearPotentialDisplacementDeltas()
public Vector2D calculateTotalDisplacement()
public Vector2D getNextPosition()
public void resetNextPosition()
public void updatePosition()
Copyright © 2018. All rights reserved.