-
- All Implemented Interfaces:
public final class SliceClass to allow two polygons to be sliced.
-
-
Field Summary
Fields Modifier and Type Field Description private Doubledistanceprivate Vec2directionprivate final ArrayList<RayInformation>intersectingBodiesInfoprivate final Vec2startPoint
-
Method Summary
Modifier and Type Method Description final DoublegetDistance()final UnitsetDistance(Double distance)final Vec2getDirection()final UnitsetDirection(Vec2 direction)final ArrayList<RayInformation>getIntersectingBodiesInfo()final Vec2getStartPoint()final UnitupdateProjection(ArrayList<TranslatableBody> bodiesToEvaluate)Updates the projection in world space and acquires information about the closest intersecting object with the ray projection. final UnitsliceObjects(World world)Slices any polygons in the world supplied that intersect with the ray projection. -
-
Method Detail
-
getDistance
final Double getDistance()
-
setDistance
final Unit setDistance(Double distance)
-
getDirection
final Vec2 getDirection()
-
setDirection
final Unit setDirection(Vec2 direction)
-
getIntersectingBodiesInfo
final ArrayList<RayInformation> getIntersectingBodiesInfo()
-
getStartPoint
final Vec2 getStartPoint()
-
updateProjection
final Unit updateProjection(ArrayList<TranslatableBody> bodiesToEvaluate)
Updates the projection in world space and acquires information about the closest intersecting object with the ray projection.
- Parameters:
bodiesToEvaluate- Arraylist of bodies to check if they intersect with the ray projection.
-
sliceObjects
final Unit sliceObjects(World world)
Slices any polygons in the world supplied that intersect with the ray projection.
- Parameters:
world- World object for the slice to effect.
-
-
-
-