@Component @Lazy public class LocationTracker extends Object implements ch.sahits.game.openpatrician.model.sea.ILocationTracker
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private org.apache.logging.log4j.Logger |
logger |
private ch.sahits.game.openpatrician.model.IMap |
map |
protected com.google.common.collect.Interner<javafx.geometry.Point2D> |
pointInterner |
private List<WeakReference<ch.sahits.game.openpatrician.model.ship.INavigableVessel>>[] |
segments |
private int |
segmentWidth |
| Constructor and Description |
|---|
LocationTracker() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship) |
private int |
calculateHorizontalIndex(javafx.geometry.Point2D location) |
List<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
getShipsInSegment(javafx.geometry.Point2D location) |
List<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
getShipsInSegments(javafx.geometry.Point2D location,
int radius) |
void |
handleShipMove(ShipPositionUpdateEvent event) |
(package private) void |
initialize() |
void |
remove(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship) |
private void |
unregister() |
private final org.apache.logging.log4j.Logger logger
@Autowired private ch.sahits.game.openpatrician.model.IMap map
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired protected com.google.common.collect.Interner<javafx.geometry.Point2D> pointInterner
private int segmentWidth
private List<WeakReference<ch.sahits.game.openpatrician.model.ship.INavigableVessel>>[] segments
@PostConstruct void initialize()
@PreDestroy private void unregister()
private int calculateHorizontalIndex(javafx.geometry.Point2D location)
public void add(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
add in interface ch.sahits.game.openpatrician.model.sea.ILocationTrackerpublic void remove(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
public List<ch.sahits.game.openpatrician.model.ship.INavigableVessel> getShipsInSegment(javafx.geometry.Point2D location)
public List<ch.sahits.game.openpatrician.model.ship.INavigableVessel> getShipsInSegments(javafx.geometry.Point2D location, int radius)
public void handleShipMove(ShipPositionUpdateEvent event)
Copyright © 2011-2016 Sahits GmbH. All Rights Reserved.