Class Sum
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.cognitive.PhysicalSteeringStrategy
,it.unibo.alchemist.model.cognitive.SteeringStrategy
public final class Sum<T extends Object> implements PhysicalSteeringStrategy<T, Euclidean2DPosition, Euclidean2DTransformation, Euclidean2DShapeFactory>
A PhysicalSteeringStrategy performing a simple sum of the overall intentional force and the physical ones.
-
-
Field Summary
Fields Modifier and Type Field Description private final Node<T>
node
private final SteeringStrategy<T, Euclidean2DPosition>
nonPhysicalStrategy
-
Constructor Summary
Constructors Constructor Description Sum(Physics2DEnvironment<T> environment, Node<T> node, SteeringStrategy<T, Euclidean2DPosition> nonPhysicalStrategy)
-
Method Summary
Modifier and Type Method Description Node<T>
getNode()
The node to be moved. SteeringStrategy<T, Euclidean2DPosition>
getNonPhysicalStrategy()
The combination of intentional forces (= steering actions) and computeTarget are delegated to this strategy. Euclidean2DPosition
computeNextPosition(Euclidean2DPosition overallIntentionalForce)
Computes the next relative position reached by the node, given the overall intentional force. -
-
Constructor Detail
-
Sum
Sum(Physics2DEnvironment<T> environment, Node<T> node, SteeringStrategy<T, Euclidean2DPosition> nonPhysicalStrategy)
-
-
Method Detail
-
getNonPhysicalStrategy
SteeringStrategy<T, Euclidean2DPosition> getNonPhysicalStrategy()
The combination of intentional forces (= steering actions) and computeTarget are delegated to this strategy.
-
computeNextPosition
Euclidean2DPosition computeNextPosition(Euclidean2DPosition overallIntentionalForce)
Computes the next relative position reached by the node, given the overall intentional force.
-
-
-
-