Package toxi.geom

Class CircleIntersector

java.lang.Object
toxi.geom.CircleIntersector
All Implemented Interfaces:
Intersector2D

public class CircleIntersector extends Object implements Intersector2D
This class handles Circle-Ray2D intersections by implementing the Intersector2D interface.
  • Constructor Details

    • CircleIntersector

      public CircleIntersector(Circle circle)
  • Method Details

    • getCircle

      public Circle getCircle()
    • getIntersectionData

      public IsectData2D getIntersectionData()
      Specified by:
      getIntersectionData in interface Intersector2D
      Returns:
      intersection data parcel
    • intersectsRay

      public boolean intersectsRay(Ray2D ray)
      Description copied from interface: Intersector2D
      Check if entity intersects with the given ray
      Specified by:
      intersectsRay in interface Intersector2D
      Parameters:
      ray - ray to check
      Returns:
      true, if ray hits the entity
    • setCircle

      public void setCircle(Circle circle)