Class PhysicalPedestrian2D
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.NodeProperty
,it.unibo.alchemist.model.physics.properties.PhysicalPedestrian
,it.unibo.alchemist.model.physics.properties.PhysicalPedestrian2D
,it.unibo.alchemist.model.physics.properties.PhysicalProperty
,java.io.Serializable
public final class PhysicalPedestrian2D<T extends Object> extends AbstractNodeProperty<T> implements PhysicalPedestrian2D<T>
Base implementation of a pedestrian's capability to experience physical interactions in a 2D space.
-
-
Field Summary
Fields Modifier and Type Field Description private final Boolean
isFallen
private final Double
comfortRay
private final Shape<Euclidean2DPosition, Euclidean2DTransformation>
comfortArea
private final Shape<Euclidean2DPosition, Euclidean2DTransformation>
rectangleOfInfluence
private final Physics2DEnvironment<T>
environment
private final Node<T>
node
-
Constructor Summary
Constructors Constructor Description PhysicalPedestrian2D(RandomGenerator randomGenerator, Physics2DEnvironment<T> environment, Node<T> node)
-
Method Summary
Modifier and Type Method Description Boolean
isFallen()
Double
getComfortRay()
Shape<Euclidean2DPosition, Euclidean2DTransformation>
getComfortArea()
Shape<Euclidean2DPosition, Euclidean2DTransformation>
getRectangleOfInfluence()
final Physics2DEnvironment<T>
getEnvironment()
The environment in which the node is moving. Node<T>
getNode()
Unit
checkAndPossiblyFall()
Boolean
shouldFall(List<Euclidean2DPosition> pushingForces)
List<Euclidean2DPosition>
repulsionForces()
Euclidean2DPosition
repulse(Node<T> other)
List<Euclidean2DPosition>
avoidanceForces()
Euclidean2DPosition
avoid(Node<T> other)
List<Euclidean2DPosition>
fallenAgentAvoidanceForces()
Unit
onFall(Function1<Node<T>, Unit> listener)
List<Euclidean2DPosition>
physicalForces(PhysicsEnvironment<T, Euclidean2DPosition, Euclidean2DTransformation, Euclidean2DShapeFactory> environment)
PhysicalPedestrian2D<T>
cloneOnNewNode(Node<T> node)
String
toString()
-
-
Constructor Detail
-
PhysicalPedestrian2D
PhysicalPedestrian2D(RandomGenerator randomGenerator, Physics2DEnvironment<T> environment, Node<T> node)
-
-
Method Detail
-
getComfortRay
Double getComfortRay()
-
getComfortArea
Shape<Euclidean2DPosition, Euclidean2DTransformation> getComfortArea()
-
getRectangleOfInfluence
Shape<Euclidean2DPosition, Euclidean2DTransformation> getRectangleOfInfluence()
-
getEnvironment
final Physics2DEnvironment<T> getEnvironment()
The environment in which the node is moving.
-
checkAndPossiblyFall
Unit checkAndPossiblyFall()
-
shouldFall
Boolean shouldFall(List<Euclidean2DPosition> pushingForces)
-
repulsionForces
List<Euclidean2DPosition> repulsionForces()
-
repulse
Euclidean2DPosition repulse(Node<T> other)
-
avoidanceForces
List<Euclidean2DPosition> avoidanceForces()
-
avoid
Euclidean2DPosition avoid(Node<T> other)
-
fallenAgentAvoidanceForces
List<Euclidean2DPosition> fallenAgentAvoidanceForces()
-
physicalForces
List<Euclidean2DPosition> physicalForces(PhysicsEnvironment<T, Euclidean2DPosition, Euclidean2DTransformation, Euclidean2DShapeFactory> environment)
-
cloneOnNewNode
PhysicalPedestrian2D<T> cloneOnNewNode(Node<T> node)
-
-
-
-