Package org.matsim.vis.snapshotwriters
Class AgentSnapshotInfoFactory
- java.lang.Object
-
- org.matsim.vis.snapshotwriters.AgentSnapshotInfoFactory
-
public class AgentSnapshotInfoFactory extends Object
translation of physical position (e.g. odometer distance on link, lane) into visualization position- Author:
- nagel
-
-
Constructor Summary
Constructors Constructor Description AgentSnapshotInfoFactory(SnapshotLinkWidthCalculator widthCalculator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentSnapshotInfo
createAgentSnapshotInfo(Id<Person> agentId, double easting, double northing, double elevation, double azimuth)
AgentSnapshotInfo
createAgentSnapshotInfo(Id<Person> agentId, Coord startCoord, Coord endCoord, double distanceOnLink, Integer lane, double curveLength)
creator based on CoordAgentSnapshotInfo
createAgentSnapshotInfo(Id<Person> agentId, Link link, double distanceOnLink, int lane)
Generate snapshot info based on Link.
-
-
-
Constructor Detail
-
AgentSnapshotInfoFactory
public AgentSnapshotInfoFactory(SnapshotLinkWidthCalculator widthCalculator)
-
-
Method Detail
-
createAgentSnapshotInfo
public AgentSnapshotInfo createAgentSnapshotInfo(Id<Person> agentId, double easting, double northing, double elevation, double azimuth)
- Parameters:
elevation
-
-
createAgentSnapshotInfo
public AgentSnapshotInfo createAgentSnapshotInfo(Id<Person> agentId, Link link, double distanceOnLink, int lane)
Generate snapshot info based on Link. Comments:- One could argue that this method should not know about Links at all, but it shortens code at several places, and since Link is a standard interface, I see no reason to not provide this as a service.
-
createAgentSnapshotInfo
public AgentSnapshotInfo createAgentSnapshotInfo(Id<Person> agentId, Coord startCoord, Coord endCoord, double distanceOnLink, Integer lane, double curveLength)
creator based on Coord- Parameters:
curveLength
- lengths are usually different (usually longer) than the euclidean distances between the startCoord and endCoord
-
-