1. Karsten Schmidt
  2. toxiclibs
  3. Issues


Issue #39 resolved

CircleIntersector.intersectsRay results in toxi.geom.CircleIntersector.intersectsRay(Unknown Source)

Shawn Workman
created an issue

I am attempting to determine if a Circle (pCir) is visible from a particular Circle (hCir).

I create a Ray2D (ray) from hCir to pCir, then create a CircleIntersector(pCir). This works fine until I try to find out if ray intersects pCir. When I do this: boolean intersect = cI.intersectsRay(ray);

It crashes.

I have attached the sketch and error output

Comments (4)

  1. Shawn Workman reporter

    (Reply via sh...@bsdguy.com):

    Forgive the craziness. Today was my first day back at work..

    This fixes it..

    boolean target(Circle _o, Circle _d) { Vec2D direction =3D new Line2D(_o, _d).getDirection(); Ray2D ray =3D new Ray2D(_o, direction); Line2D rLine =3D ray.toLine2DWithPointAtDistance(400); strokeWeight(1); gfx.line(rLine);

    CircleIntersector cI =3D new CircleIntersector(_d); =20 return cI.intersectsRay(ray); }

    On Nov 5, 2012, at 1:36 AM, Karsten Schmidt issues-reply@bitbucket.org = wrote:

  2. Log in to comment