Sum
class Sum<T>(environment: Physics2DEnvironment<T>, val node: Node<T>, val nonPhysicalStrategy: SteeringStrategy<T, Euclidean2DPosition>) : PhysicalSteeringStrategy<T, Euclidean2DPosition, Euclidean2DTransformation, Euclidean2DShapeFactory>
A PhysicalSteeringStrategy performing a simple sum of the overall intentional force and the physical ones.
Constructors
Link copied to clipboard
constructor(environment: Physics2DEnvironment<T>, node: Node<T>, nonPhysicalStrategy: SteeringStrategy<T, Euclidean2DPosition>)
Properties
Functions
Link copied to clipboard
open override fun computeNextPosition(actions: List<SteeringAction<T, Euclidean2DPosition>>): Euclidean2DPosition
Computes the next position by delegating the combination of steering actions to nonPhysicalStrategy and then applying physical dynamics.
open override fun computeNextPosition(overallIntentionalForce: Euclidean2DPosition): Euclidean2DPosition
Computes the next relative position given the overall intentional force.
Link copied to clipboard
open override fun computeTarget(actions: List<SteeringAction<T, Euclidean2DPosition>>): Euclidean2DPosition
Delegates target computation to nonPhysicalStrategy.