Constructor and Description |
---|
RayCastingLOS()
Creates an instance of this solver which uses the default gap and step.
|
RayCastingLOS(float step,
float gap)
Creates a new instance of this solver which uses the provided step
distance and gap distance when performing calculations.
|
Modifier and Type | Method and Description |
---|---|
java.util.Queue<java.awt.Point> |
getLastPath()
Returns the path of the last LOS calculation, with the starting point as
the head of the queue.
|
boolean |
isReachable(float[][] resistanceMap,
int startx,
int starty,
int targetx,
int targety)
Returns true if a line can be drawn from the start point to the target
point without intervening obstructions.
|
boolean |
isReachable(float[][] resistanceMap,
int startx,
int starty,
int targetx,
int targety,
float force,
float decay,
RadiusStrategy radiusStrategy)
Returns true if a line can be drawn from the start point to the target
point without intervening obstructions.
|
public RayCastingLOS(float step, float gap)
step
- gap
- public RayCastingLOS()
public boolean isReachable(float[][] resistanceMap, int startx, int starty, int targetx, int targety, float force, float decay, RadiusStrategy radiusStrategy)
LOSSolver
isReachable
in interface LOSSolver
resistanceMap
- marks the level of resistance the the line per cellforce
- the amount of impetus to start withdecay
- the amount the force is reduced per unit distanceradiusStrategy
- the strategy to use in computing unit distancepublic boolean isReachable(float[][] resistanceMap, int startx, int starty, int targetx, int targety)
LOSSolver
isReachable
in interface LOSSolver
public java.util.Queue<java.awt.Point> getLastPath()
LOSSolver
getLastPath
in interface LOSSolver