-
- All Implemented Interfaces:
public final class ShadowCasting
A class for generating polygons that can mimic line of sight around objects and cast shadows.
-
-
Field Summary
Fields Modifier and Type Field Description private final ArrayList<RayAngleInformation>
rayData
private final Integer
noOfRays
private Vec2
startPoint
-
Constructor Summary
Constructors Constructor Description ShadowCasting(Vec2 startPoint, Double distance)
-
Method Summary
Modifier and Type Method Description final ArrayList<RayAngleInformation>
getRayData()
final Integer
getNoOfRays()
final Vec2
getStartPoint()
final Unit
setStartPoint(Vec2 startPoint)
final Unit
updateProjections(ArrayList<TranslatableBody> bodiesToEvaluate)
Updates the all projections in world space and acquires information about all intersecting rays. -
-
Method Detail
-
getRayData
final ArrayList<RayAngleInformation> getRayData()
-
getNoOfRays
final Integer getNoOfRays()
-
getStartPoint
final Vec2 getStartPoint()
-
setStartPoint
final Unit setStartPoint(Vec2 startPoint)
-
updateProjections
final Unit updateProjections(ArrayList<TranslatableBody> bodiesToEvaluate)
Updates the all projections in world space and acquires information about all intersecting rays.
- Parameters:
bodiesToEvaluate
- Arraylist of bodies to check if they intersect with the ray projection.
-
-
-
-