public class FRaycastResult
extends java.lang.Object
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);
}
FContact| Constructor and Description |
|---|
FRaycastResult() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public float getLambda()
public float getNormalX()
getNormalY()public float getNormalY()
getNormalX()public float getX()
getY(),
getNormalX(),
getNormalY()public float getY()
getX(),
getNormalX(),
getNormalY()processing library fisica by Ricard Marxer. (c) 2009-2014