org.kabeja.math
Class ParametricPlane
java.lang.Object
org.kabeja.math.ParametricPlane
public class ParametricPlane
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
base
protected Point base
directionX
protected Vector directionX
directionY
protected Vector directionY
normal
protected Vector normal
ParametricPlane
public ParametricPlane(Point basePoint,
Vector directionX,
Vector directionY,
Vector normal)
- Parameters:
basePoint
- The base point of this planedirectionX
- the x direction of this planedirectionY
- the y direction of this planenormal
- the normal direction of this plane
ParametricPlane
public ParametricPlane(Point basePoint,
Vector directionX,
Vector directionY)
- Parameters:
basePoint
- The base point of this planedirectionX
- the x direction of this planedirectionY
- 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)
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()