-
- All Implemented Interfaces:
public final class ShadowCastingA 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>rayDataprivate final IntegernoOfRaysprivate Vec2startPoint
-
Constructor Summary
Constructors Constructor Description ShadowCasting(Vec2 startPoint, Double distance)
-
Method Summary
Modifier and Type Method Description final ArrayList<RayAngleInformation>getRayData()final IntegergetNoOfRays()final Vec2getStartPoint()final UnitsetStartPoint(Vec2 startPoint)final UnitupdateProjections(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.
-
-
-
-