de.rico.engine.geometry
Class Plane

java.lang.Object
  extended by de.rico.engine.geometry.Plane
Direct Known Subclasses:
FrustumPlane

public class Plane
extends java.lang.Object

This class represents a plane that is defined by the common plane equation Ax + By + Cz + D = 0.

Author:
Frank Bruns

Constructor Summary
Plane()
          Creates a new frustum plane with all values initially 0f.
Plane(float a, float b, float c, float d)
          Creates a new plane with the specified values for the plane equation's coefficients.
 
Method Summary
 float getA()
          Returns the A coefficient of the plane equation
 float getB()
          Returns the B coefficient of the plane equation
 float getC()
          Returns the C coefficient of the plane equation
 float getD()
          Returns the D coefficient of the plane equation
 void setA(float a)
          Sets the plane equation's A coefficient
 void setB(float b)
          Sets the plane equation's B coefficient
 void setC(float c)
          Sets the plane equation's C coefficient
 void setD(float d)
          Sets the plane equation's D coefficient
 void setPlaneCoefficients(float a, float b, float c, float d)
          Sets the coefficients of the plane equation to the specified values for a, b, c and d
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plane

public Plane()
Creates a new frustum plane with all values initially 0f.


Plane

public Plane(float a,
             float b,
             float c,
             float d)
Creates a new plane with the specified values for the plane equation's coefficients. (Ax + By + Cz + D = 0)

Parameters:
a - coefficient value for A
b - coefficient value for B
c - coefficient value for C
d - coefficient value for D
Method Detail

setPlaneCoefficients

public void setPlaneCoefficients(float a,
                                 float b,
                                 float c,
                                 float d)
Sets the coefficients of the plane equation to the specified values for a, b, c and d

Parameters:
a - A value of the plane equation
b - B value of the plane equation
c - C value of the plane equation
d - D value of the plane equation

getA

public float getA()
Returns the A coefficient of the plane equation

Returns:
A coefficient of the plane equation

setA

public void setA(float a)
Sets the plane equation's A coefficient

Parameters:
a - A value of the plane equation

setB

public void setB(float b)
Sets the plane equation's B coefficient

Parameters:
b - B value of the plane equation

setC

public void setC(float c)
Sets the plane equation's C coefficient

Parameters:
c - C value of the plane equation

setD

public void setD(float d)
Sets the plane equation's D coefficient

Parameters:
d - D value of the plane equation

getB

public float getB()
Returns the B coefficient of the plane equation

Returns:
B coefficient of the plane equation

getC

public float getC()
Returns the C coefficient of the plane equation

Returns:
C coefficient of the plane equation

getD

public float getD()
Returns the D coefficient of the plane equation

Returns:
D coefficient of the plane equation