fisica
Class FRaycastResult

java.lang.Object
  extended by fisica.FRaycastResult

public class FRaycastResult
extends java.lang.Object

Represents the result of a casted ray.

 FWorld world;

 void setup() {
   Fisica.init(this);

   world = new FWorld();
   world.setEdges();

   // Create and add bodies to the world here
   // ...
 }

 void draw() {
   world.step();
   world.draw();

   FRaycastResult result = null;
   FBody b = world.raycastOne(width/2, height/2, mouseX, mouseY, result, true);
 }


 

See Also:
FContact

Constructor Summary
FRaycastResult()
           
 
Method Summary
 float getLambda()
          Returns the lambda of the raycast result.
 float getNormalX()
          Returns the horizontal component of the ray cast contact normal.
 float getNormalY()
          Returns the vertical component of the ray cast contact normal.
 float getX()
          Returns the horizontal component of the ray cast contact normal.
 float getY()
          Returns the vertical component of the contact ray cast normal.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FRaycastResult

public FRaycastResult()
Method Detail

getLambda

public float getLambda()
Returns the lambda of the raycast result.

Returns:
the lambda of the raycast result

getNormalX

public float getNormalX()
Returns the horizontal component of the ray cast contact normal.

Returns:
the horizontal component of the ray cast contact normal
See Also:
getNormalY()

getNormalY

public float getNormalY()
Returns the vertical component of the ray cast contact normal.

Returns:
the vertical component of the ray cast contact normal
See Also:
getNormalX()

getX

public float getX()
Returns the horizontal component of the ray cast contact normal.

Returns:
the horizontal component of the ray cast contact normal
See Also:
getY(), getNormalX(), getNormalY()

getY

public float getY()
Returns the vertical component of the contact ray cast normal.

Returns:
the vertical component of the contact ray cast normal
See Also:
getX(), getNormalX(), getNormalY()


processing library fisica by Ricard Marxer. (c) 2009-2013