org.kabeja.math
Class ParametricPlane

java.lang.Object
  extended by org.kabeja.math.ParametricPlane

public class ParametricPlane
extends java.lang.Object


Field Summary
protected  Point base
           
protected  Vector directionX
           
protected  Vector directionY
           
protected  Vector normal
           
 
Constructor Summary
ParametricPlane(DXFExtrusion e)
           
ParametricPlane(Point basePoint, Point b, Point c)
           
ParametricPlane(Point basePoint, Point b, Vector normal)
          Generates a plane with the base point and uses the vector from base point to b as x direction.
ParametricPlane(Point basePoint, Vector directionX, Vector directionY)
           
ParametricPlane(Point basePoint, Vector directionX, Vector directionY, Vector normal)
           
 
Method Summary
 Point getBasePoint()
           
 Vector getDirectionX()
           
 Vector getDirectionY()
           
 Vector getNormal()
           
 double[] getParameter(Point p)
          Calculates the plane parameters of the given point relative to the base point of the plane
 Point getPoint(double x, double y)
          Calculate the point in world coordinates for the given parameters
 Point getPoint(Point point)
           
 boolean isOnPlane(Point p)
          Determines if the given point lies on the plane.
 void setBasePoint(Point base)
           
 void setDirectionX(Vector directionX)
           
 void setDirectionY(Vector directionY)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

base

protected Point base

directionX

protected Vector directionX

directionY

protected Vector directionY

normal

protected Vector normal
Constructor Detail

ParametricPlane

public ParametricPlane(Point basePoint,
                       Vector directionX,
                       Vector directionY,
                       Vector normal)
Parameters:
basePoint - The base point of this plane
directionX - the x direction of this plane
directionY - the y direction of this plane
normal - the normal direction of this plane

ParametricPlane

public ParametricPlane(Point basePoint,
                       Vector directionX,
                       Vector directionY)
Parameters:
basePoint - The base point of this plane
directionX - the x direction of this plane
directionY - the y direction of this plane

ParametricPlane

public ParametricPlane(Point basePoint,
                       Point b,
                       Vector normal)
Generates a plane with the base point and uses the vector from base point to b as x direction. The y direction is generated with the cross product of the normal with the x direction.

Parameters:
basePoint -
b -
normal -

ParametricPlane

public ParametricPlane(Point basePoint,
                       Point b,
                       Point c)

ParametricPlane

public ParametricPlane(DXFExtrusion e)
Method Detail

getPoint

public Point getPoint(double x,
                      double y)
Calculate the point in world coordinates for the given parameters

Parameters:
x -
y -
Returns:

getPoint

public Point getPoint(Point point)

getParameter

public double[] getParameter(Point p)
Calculates the plane parameters of the given point relative to the base point of the plane

Parameters:
p -
Returns:
double[]{parameter x direction, parameter y direction}

isOnPlane

public boolean isOnPlane(Point p)
Determines if the given point lies on the plane.

Parameters:
p - the point to determine
Returns:
true if the point lies on the plane, otherwise false.

getBasePoint

public Point getBasePoint()

setBasePoint

public void setBasePoint(Point base)

getDirectionX

public Vector getDirectionX()

setDirectionX

public void setDirectionX(Vector directionX)

getDirectionY

public Vector getDirectionY()

setDirectionY

public void setDirectionY(Vector directionY)

getNormal

public Vector getNormal()