EigenMeat.EigenMaze
Class Plane

java.lang.Object
  extended byEigenMeat.EigenMaze.Plane

public class Plane
extends java.lang.Object

Helper class for various triangle-based algorithms.


Constructor Summary
Plane()
          Default constructor.
Plane(float a, float b, float c, float d)
          Constructor that allows setting of the plane variables (Ax+By+Cz+D=0)
Plane(Vect3d normal, float distance)
          Constructor.
Plane(Vect3d normal, Vect3d point)
           
 
Method Summary
 boolean doesLineIntersect(Vect3d p1, Vect3d p2)
           
 float getA()
          Get the A component.
 float getB()
          Get the B component.
 float getC()
          Get the C component.
 Vect3d getNormal()
          Returns the plane's normal.
 float getPlaneDistance()
          Returns the plane distance.
 float getPointDistance(Vect3d point)
           
 boolean isPointInFront(float x, float y, float z)
          Checks to see if a point is in front of the plane/
 boolean isPointInFront(Vect3d point)
          Checks to see if a point is in front of the plane.
 void normalize()
          Normalize the plane.
 void set(float a, float b, float c, float d)
          Sets the planes variables after Plane object is created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plane

public Plane()
Default constructor.


Plane

public Plane(float a,
             float b,
             float c,
             float d)
Constructor that allows setting of the plane variables (Ax+By+Cz+D=0)

Parameters:
a - A
b - B
c - C
d - D

Plane

public Plane(Vect3d normal,
             float distance)
Constructor. Allows setting of plane normal using a Vect3d.

Parameters:
normal - plane normal
distance - plane distance

Plane

public Plane(Vect3d normal,
             Vect3d point)
Method Detail

set

public void set(float a,
                float b,
                float c,
                float d)
Sets the planes variables after Plane object is created.

Parameters:
a - A
b - B
c - C
d - D

getA

public float getA()
Get the A component.

Returns:
A component

getB

public float getB()
Get the B component.

Returns:
B component

getC

public float getC()
Get the C component.

Returns:
C component

getPlaneDistance

public float getPlaneDistance()
Returns the plane distance.

Returns:
plane distance

getNormal

public Vect3d getNormal()
Returns the plane's normal.

Returns:
plane's normal

getPointDistance

public float getPointDistance(Vect3d point)

normalize

public void normalize()
Normalize the plane.


isPointInFront

public boolean isPointInFront(Vect3d point)
Checks to see if a point is in front of the plane.

Parameters:
point - the point
Returns:
true if point is in front of the plane, else false

isPointInFront

public boolean isPointInFront(float x,
                              float y,
                              float z)
Checks to see if a point is in front of the plane/

Parameters:
x - x coordinate
y - y coordinate
z - z coordinate
Returns:
true of point is in front of the plane, else false

doesLineIntersect

public boolean doesLineIntersect(Vect3d p1,
                                 Vect3d p2)