T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic abstract class FormationMotionModerator<T extends com.badlogic.gdx.math.Vector<T>>
extends java.lang.Object
FormationMotionModerator moderates the movement of the formation based on the current positions of the members in its
slots: in effect to keep the anchor point on a leash. If the members in the slots are having trouble reaching their targets,
then the formation as a whole should be held back to give them a chance to catch up.| Constructor and Description |
|---|
FormationMotionModerator() |
| Modifier and Type | Method and Description |
|---|---|
Location<T> |
calculateDriftOffset(Location<T> centerOfMass,
com.badlogic.gdx.utils.Array<SlotAssignment<T>> slotAssignments,
FormationPattern<T> pattern)
Calculates the drift offset when members are in the given set of slots for the specified pattern.
|
abstract void |
updateAnchorPoint(Location<T> anchor)
Update the anchor point to moderate formation motion.
|
public abstract void updateAnchorPoint(Location<T> anchor)
anchor - the anchor pointpublic Location<T> calculateDriftOffset(Location<T> centerOfMass, com.badlogic.gdx.utils.Array<SlotAssignment<T>> slotAssignments, FormationPattern<T> pattern)
centerOfMass - the output location set to the calculated drift offsetslotAssignments - the set of slotspattern - the pattern