congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
BroadPhase.raycast
Code IndexAdd Tabnine to your IDE (free)

How to use
raycast
method
in
org.jbox2d.collision.broadphase.BroadPhase

Best Java code snippets using org.jbox2d.collision.broadphase.BroadPhase.raycast (Showing top 9 results out of 315)

origin: libgdx/libgdx

/**
 * Ray-cast the world for all fixtures 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 point1 the ray starting point
 * @param point2 the ray ending point
 */
public void raycast(RayCastCallback callback, 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);
}
origin: libgdx/libgdx

/**
 * 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);
}
origin: jbox2d/jbox2d

/**
 * Ray-cast the world for all fixtures 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 point1 the ray starting point
 * @param point2 the ray ending point
 */
public void raycast(RayCastCallback callback, 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);
}
origin: jbox2d/jbox2d

/**
 * 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);
}
origin: andmizi/MobikeTags

/**
 * Ray-cast the world for all fixtures 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 point1 the ray starting point
 * @param point2 the ray ending point
 */
public void raycast(RayCastCallback callback, 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);
}
origin: org.jbox2d/jbox2d-library

/**
 * Ray-cast the world for all fixtures 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 point1 the ray starting point
 * @param point2 the ray ending point
 */
public void raycast(RayCastCallback callback, 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);
}
origin: com.github.almasb/fxgl-physics

/**
 * Ray-cast the world for all fixtures 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 point1 the ray starting point
 * @param point2 the ray ending point
 */
public void raycast(RayCastCallback callback, 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);
}
origin: andmizi/MobikeTags

/**
 * 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);
}
origin: com.github.almasb/fxgl-physics

/**
 * 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);
  particleSystem.raycast(particleCallback, point1, point2);
}
org.jbox2d.collision.broadphaseBroadPhaseraycast

Javadoc

Ray-cast against the proxies in the tree. This relies on the callback to perform a exact ray-cast in the case were the proxy contains a shape. The callback also performs the any collision filtering. This has performance roughly equal to k * log(n), where k is the number of collisions and n is the number of proxies in the tree.

Popular methods of BroadPhase

  • createProxy
    Create a proxy with an initial AABB. Pairs are not reported until updatePairs is called.
  • destroyProxy
    Destroy a proxy. It is up to the client to remove any pairs.
  • drawTree
  • getFatAABB
  • getProxyCount
    Get the number of proxies.
  • getTreeBalance
  • getTreeHeight
    Get the height of the embedded tree.
  • getTreeQuality
  • getUserData
  • moveProxy
    Call MoveProxy as many times as you like, then when you are done call UpdatePairs to finalized the p
  • query
    Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the
  • testOverlap
  • query,
  • testOverlap,
  • touchProxy,
  • updatePairs,
  • <init>,
  • bufferMove,
  • unbufferMove

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now