-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.PhysicalSteeringStrategy,it.unibo.alchemist.model.interfaces.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 PhysicalPedestrian2D<T>nodeprivate final SteeringStrategy<T, Euclidean2DPosition>nonPhysicalStrategy
-
Constructor Summary
Constructors Constructor Description Sum(Physics2DEnvironment<T> environment, PhysicalPedestrian2D<T> node, SteeringStrategy<T, Euclidean2DPosition> nonPhysicalStrategy)
-
Method Summary
Modifier and Type Method Description PhysicalPedestrian2D<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. Euclidean2DPositioncomputeNextPosition(Euclidean2DPosition overallIntentionalForce)Computes the next relative position reached by the node, given the overall intentional force. -
-
Constructor Detail
-
Sum
Sum(Physics2DEnvironment<T> environment, PhysicalPedestrian2D<T> node, SteeringStrategy<T, Euclidean2DPosition> nonPhysicalStrategy)
-
-
Method Detail
-
getNode
PhysicalPedestrian2D<T> getNode()
The node to be moved.
-
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.
-
-
-
-