radtools.graphing
Class Point

java.lang.Object
  extended by radtools.graphing.Point

public class Point
extends Object

Point class represents a set of coordinates on a three dimensional graph can be used for two dimensions with z coordinate defaulted as 0

Author:
lgutnik

Field Summary
private  double myX
           
private  double myY
           
private  double myZ
           
 
Constructor Summary
Point(double x, double y, double z)
           
 
Method Summary
 void fixPoint(int toFix, double n)
          If adjusting a point is automated, this can be used instead of the set# methods
 double getX()
          accessor method for x coordinate
 double getY()
          accessor method for y coordinate
 double getZ()
          accessor method for z coordinate
 void setX(double x)
          Changes this point's first coordinate
 void setY(double x)
          Changes this point's second coordinate
 void setZ(double x)
          Changes this point's third coordinate
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myX

private double myX

myY

private double myY

myZ

private double myZ
Constructor Detail

Point

public Point(double x,
             double y,
             double z)
Method Detail

fixPoint

public void fixPoint(int toFix,
                     double n)
If adjusting a point is automated, this can be used instead of the set# methods

Parameters:
toFix - represents the position of the coordinate to be altered, 0 for x, 1 for y, 2 for z
n - is the new value of the coordinate

getX

public double getX()
accessor method for x coordinate

Returns:
first coordinate as double, default is 0

getY

public double getY()
accessor method for y coordinate

Returns:
second coordinate as double, default is 0

getZ

public double getZ()
accessor method for z coordinate

Returns:
third coordinate as double, default is 0

setX

public void setX(double x)
Changes this point's first coordinate

Parameters:
x - new double value of x coordinate

setY

public void setY(double x)
Changes this point's second coordinate

Parameters:
x - new double value of y coordinate

setZ

public void setZ(double x)
Changes this point's third coordinate

Parameters:
x - new double value of z coordinate

toString

public String toString()
Overrides:
toString in class Object