|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfisica.FRaycastResult
public class FRaycastResult
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);
}
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 |
|---|
public FRaycastResult()
| Method Detail |
|---|
public float getLambda()
public float getNormalX()
getNormalY()public float getNormalY()
getNormalX()public float getX()
getY(),
getNormalX(),
getNormalY()public float getY()
getX(),
getNormalX(),
getNormalY()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||