|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threed.jpct.Plane
A simple class to represent a plane. jPCT is using this for collision detection. It can also be used to add additional clipping planes when using a hardware renderer.
| Constructor Summary | |
Plane()
Creates a undefined plane. |
|
Plane(SimpleVector point,
SimpleVector normal)
Constructs a plane from a point on the plane and a normal |
|
Plane(SimpleVector p0,
SimpleVector p1,
SimpleVector p2)
Constructs a plane from three points that lie within the plane. |
|
| Method Summary | |
float |
distanceTo(SimpleVector point)
Calculates the shortest (signed) distance from a point to the plane. |
boolean |
isFrontFacingTo(SimpleVector point)
Tests is the plane is facing the point or if the point is located "behind" the plane. |
void |
setTo(SimpleVector point,
SimpleVector normal)
Sets the plane's attributes to new ones. |
void |
setTo(SimpleVector p0,
SimpleVector p1,
SimpleVector p2)
Sets the plane's attributes to new ones. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Plane()
public Plane(SimpleVector point,
SimpleVector normal)
point - the point on the planenormal - the plane's normal
public Plane(SimpleVector p0,
SimpleVector p1,
SimpleVector p2)
p0 - first pointp1 - second pointp2 - third point| Method Detail |
public void setTo(SimpleVector point,
SimpleVector normal)
point - the point on the planenormal - the plane's normal
public void setTo(SimpleVector p0,
SimpleVector p1,
SimpleVector p2)
p0 - first pointp1 - second pointp2 - third pointpublic boolean isFrontFacingTo(SimpleVector point)
point - the point
public float distanceTo(SimpleVector point)
point - the point
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||