com.quinncurtis.chart3djava
Class GroupPoint3D

java.lang.Object
  extended by com.quinncurtis.chart3djava.GroupPoint3D
Direct Known Subclasses:
GroupPoint2D

public class GroupPoint3D
extends java.lang.Object

This class encapsulates a single group point data item, which contains one x-value, one z-value, and multiple y-values.


Field Summary
 double x
          The x-coordinate of this GroupPoint3D.
 DoubleArray ygroup
          The y-coordinate of this GroupPoint3D.
 double z
          The z-coordinate of this GroupPoint3D.
 
Constructor Summary
GroupPoint3D()
          Default constructor.
GroupPoint3D(double px, double[] py, double pz)
          Constructs and initializes a GroupPoint3D with the specified coordinates.
GroupPoint3D(double px, DoubleArray py, double pz)
          Constructs and initializes a GroupPoint3D with the specified coordinates.
GroupPoint3D(java.util.GregorianCalendar px, double[] py, double pz)
          Constructs and initializes a Point3D with the specified coordinates.
GroupPoint3D(GroupPoint3D p)
          Constructs and initializes a GroupPoint3D with the specified coordinates.
 
Method Summary
 java.lang.Object clone()
          Creates a new object of the same class and with the same contents as this object.
static double distance(double X1, double Y1, double Z1, double X2, double Y2, double Z2)
          Returns the distance between two points.
 double distance(double PX, double PY, double PZ, int groupindex)
          Returns the distance from this GroupPoint3D to a specified point.
 double distance(GroupPoint3D pt, int groupindex)
          Returns the distance from this GroupPoint3D to a specified GroupPoint3D.
static double distanceSq(double X1, double Y1, double Z1, double X2, double Y2, double Z2)
          Returns the square of the distance between two points.
 double distanceSq(double PX, double PY, double PZ, int groupindex)
          Returns the square of the distance between the specified point and the current point.
 double distanceSq(GroupPoint3D pt, int groupindex)
          Returns the square of the distance between the specified point and the current point.
 java.util.GregorianCalendar getCalendarX()
          Returns the X coordinate of this Point3D.
 double getX()
          Returns the X coordinate of this GroupPoint3D.
 double[] getY()
          Returns the Y coordinates of this GroupPoint3D.
 double getZ()
          Returns the Z coordinate of this GroupPoint3D.
 void setLocation(double px, double[] py, double pz)
          Sets the location of this GroupPoint3D to the specified coordinates.
 void setLocation(java.util.GregorianCalendar px, double[] py, double pz)
          Initializes a Point3D with the specified coordinates.
 void setLocation(GroupPoint3D p)
          Sets the location of this GroupPoint3D to the specified coordinates.
 void setX(double value)
          Set the x-value of the point.
 void setY(int i, double value)
          Set the y-value at group index i of the point.
 void setZ(double value)
          Set the z-value of the point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public double x
The x-coordinate of this GroupPoint3D.


z

public double z
The z-coordinate of this GroupPoint3D.


ygroup

public DoubleArray ygroup
The y-coordinate of this GroupPoint3D.

Constructor Detail

GroupPoint3D

public GroupPoint3D()
Default constructor.


GroupPoint3D

public GroupPoint3D(double px,
                    double[] py,
                    double pz)
Constructs and initializes a GroupPoint3D with the specified coordinates.

Parameters:
px - the x-coordinate
py - an array of the y-coordinates
pz - the z-coordinate

GroupPoint3D

public GroupPoint3D(double px,
                    DoubleArray py,
                    double pz)
Constructs and initializes a GroupPoint3D with the specified coordinates.

Parameters:
px - the x-coordinate
py - an array of the y-coordinates
pz - the z-coordinate

GroupPoint3D

public GroupPoint3D(java.util.GregorianCalendar px,
                    double[] py,
                    double pz)
Constructs and initializes a Point3D with the specified coordinates.

Parameters:
px - the x-coordinate
py - the y-coordinates
pz - the z-coordinate

GroupPoint3D

public GroupPoint3D(GroupPoint3D p)
Constructs and initializes a GroupPoint3D with the specified coordinates.

Parameters:
p - the xy coordinates
Method Detail

getX

public double getX()
Returns the X coordinate of this GroupPoint3D.

Returns:
the X coordinate of this GroupPoint3D.

getZ

public double getZ()
Returns the Z coordinate of this GroupPoint3D.

Returns:
the Z coordinate of this GroupPoint3D.

getCalendarX

public java.util.GregorianCalendar getCalendarX()
Returns the X coordinate of this Point3D.

Returns:
the X coordinate of this Point3D.

getY

public double[] getY()
Returns the Y coordinates of this GroupPoint3D.

Returns:
the Y coordinates of this GroupPoint3D.

setLocation

public void setLocation(double px,
                        double[] py,
                        double pz)
Sets the location of this GroupPoint3D to the specified coordinates.

Parameters:
px - the x-coordinate
py - the y-coordinates
pz - the z-coordinate

setLocation

public void setLocation(java.util.GregorianCalendar px,
                        double[] py,
                        double pz)
Initializes a Point3D with the specified coordinates.

Parameters:
px - the x-coordinate
py - the y-coordinates
pz - the z-coordinate

setLocation

public void setLocation(GroupPoint3D p)
Sets the location of this GroupPoint3D to the specified coordinates.

Parameters:
p - the coordinate values

distanceSq

public static double distanceSq(double X1,
                                double Y1,
                                double Z1,
                                double X2,
                                double Y2,
                                double Z2)
Returns the square of the distance between two points.

Parameters:
X1 - the x-coordinate of the first point
Y1 - the y-coordinate of the first point
Z1 - the z-coordinate of the first point
X2 - the x-coordinate of the second point
Y2 - the y-coordinate of the second point
Z2 - the z-coordinate of the second point
Returns:
the square of the distance between the two sets of specified coordinates.

distance

public static double distance(double X1,
                              double Y1,
                              double Z1,
                              double X2,
                              double Y2,
                              double Z2)
Returns the distance between two points.

Parameters:
X1 - the x-coordinate of the first point
Y1 - the y-coordinate of the first point
Z1 - the z-coordinate of the first point
X2 - the x-coordinate of the second point
Y2 - the y-coordinate of the second point
Z2 - the z-coordinate of the second point
Returns:
the distance between the two sets of specified coordinates.

distanceSq

public double distanceSq(double PX,
                         double PY,
                         double PZ,
                         int groupindex)
Returns the square of the distance between the specified point and the current point.

Parameters:
PX - the x-value of the specified point
PY - the y-value of the specified point
PZ - the z-value of the specified point
groupindex - the group index to use for the y-value
Returns:
the square of the distance between the current point and the specified point.

distanceSq

public double distanceSq(GroupPoint3D pt,
                         int groupindex)
Returns the square of the distance between the specified point and the current point.

Parameters:
pt - the coordinates of the specified point
groupindex - the group index to use for the y-value
Returns:
the square of the distance between the current point and the specified point.

distance

public double distance(double PX,
                       double PY,
                       double PZ,
                       int groupindex)
Returns the distance from this GroupPoint3D to a specified point.

Parameters:
PX - the x-value of the specified point
PY - the y-value of the specified point
PZ - the z-value of the specified point
groupindex - the group index to use for the y-value
Returns:
the distance between this GroupPoint3D and a specified point.

distance

public double distance(GroupPoint3D pt,
                       int groupindex)
Returns the distance from this GroupPoint3D to a specified GroupPoint3D.

Parameters:
pt - the coordinates of the specified point
groupindex - the group index to use for the y-value
Returns:
the distance between this GroupPoint3D and the specified GroupPoint3D.

clone

public java.lang.Object clone()
Creates a new object of the same class and with the same contents as this object.

Overrides:
clone in class java.lang.Object
Returns:
a clone of this instance.

setX

public void setX(double value)
Set the x-value of the point.

Parameters:
value - x-value of the point.

setY

public void setY(int i,
                 double value)
Set the y-value at group index i of the point.

Parameters:
i - Group index
value - Group-y Value for the element.

setZ

public void setZ(double value)
Set the z-value of the point.

Parameters:
value - z-Value for the point.