Beispiel #1
0
 /**
    * Ray-cast the world for all particles in the path of the ray. Your callback controls whether you
    * get the closest point, any point, or n-points.
    *
    * @param particleCallback the particle callback class.
    * @param point1 the ray starting point
    * @param point2 the ray ending point
    */
 public void raycast(ParticleRaycastCallback particleCallback, Vec2 point1, Vec2 point2)
 {
     m_particleSystem.raycast(particleCallback, point1, point2);
 }
Beispiel #2
0
 /**
    * Ray-cast the world for all fixtures and particles in the path of the ray. Your callback
    * controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes
    * that contain the starting point.
    *
    * @param callback a user implemented callback class.
    * @param particleCallback the particle callback class.
    * @param point1 the ray starting point
    * @param point2 the ray ending point
    */
 public void raycast(RayCastCallback callback, ParticleRaycastCallback particleCallback,
     Vec2 point1, Vec2 point2)
 {
     wrcwrapper.broadPhase = m_contactManager.m_broadPhase;
     wrcwrapper.callback = callback;
     input.maxFraction = 1.0f;
     input.p1.set(point1);
     input.p2.set(point2);
     m_contactManager.m_broadPhase.raycast(wrcwrapper, input);
     m_particleSystem.raycast(particleCallback, point1, point2);
 }