Class RayCastMultipleCallback

java.lang.Object
org.jbox2d.testbed.tests.RayCastMultipleCallback
All Implemented Interfaces:
RayCastCallback

class RayCastMultipleCallback extends java.lang.Object implements RayCastCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    (package private) int
     
    (package private) Vec2[]
     
    (package private) Vec2[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    float
    reportFixture(Fixture fixture, Vec2 point, Vec2 normal, float fraction)
    Called for each fixture found in the query.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • e_maxCount

      public int e_maxCount
    • m_points

      Vec2[] m_points
    • m_normals

      Vec2[] m_normals
    • m_count

      int m_count
  • Constructor Details

    • RayCastMultipleCallback

      RayCastMultipleCallback()
  • Method Details

    • init

      public void init()
    • reportFixture

      public float reportFixture(Fixture fixture, Vec2 point, Vec2 normal, float fraction)
      Description copied from interface: RayCastCallback
      Called for each fixture found in the query. You control how the ray cast proceeds by returning a float: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue
      Specified by:
      reportFixture in interface RayCastCallback
      Parameters:
      fixture - the fixture hit by the ray
      point - the point of initial intersection
      normal - the normal vector at the point of intersection
      fraction -
      Returns:
      -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue