|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.ChartPoint3D
public class ChartPoint3D
The ChartPoint3D
class defines a point representing a location in (x,y,z) coordinate space.
Extrapolated from the original Sun Point2D class. This class is only the abstract super class for all
objects that store a 3D coordinate. The actual storage representation of the coordinates is
left to the subclass.
Field Summary | |
---|---|
double |
v
The v-coordinate of this Point3D . |
double |
w
The w-coordinate of this Point3D . |
double |
x
The Double class defines a point specified in double precision. |
double |
y
The Y-coordinate of this ChartPoint3D . |
double |
z
The Z-coordinate of this ChartPoint3D . |
Constructor Summary | |
---|---|
ChartPoint3D()
Default constructor. |
|
ChartPoint3D(ChartPoint3D p)
Constructs and initializes a ChartPoint3D with the specified coordinates. |
|
ChartPoint3D(double px,
double py)
Constructs and initializes a ChartPoint3D with the specified coordinates. |
|
ChartPoint3D(double px,
double py,
double pz)
Constructs and initializes a ChartPoint3D with the specified coordinates. |
|
ChartPoint3D(double px,
double py,
double pz,
double pw)
Constructs and initializes a ChartPoint3D with the specified coordinates. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a new object that is a clone of the current object. |
double |
distance(ChartPoint3D pt)
Returns the distance from this ChartPoint3D to a specified ChartPoint3D . |
double |
distance(double PX,
double PY,
double PZ)
Returns the distance from this ChartPoint3D to a specified point. |
static double |
distance(double X1,
double Y1,
double Z1,
double X2,
double Y2,
double Z2)
Returns the distance between two points. |
double |
distanceSq(ChartPoint3D pt)
Returns the square of the distance from this ChartPoint3D to a specified ChartPoint3D . |
double |
distanceSq(double PX,
double PY,
double PZ)
Returns the square of the distance from this ChartPoint3D to a specified point. |
static double |
distanceSq(double X1,
double Y1,
double Z1,
double X2,
double Y2,
double Z2)
Returns the square of the distance between two points. |
boolean |
getNewStart()
Get the newStart-value of the point. |
java.awt.geom.Point2D.Double |
getPoint2DDouble()
Get the point as a Point2D.Double object. |
java.awt.geom.Point2D.Float |
getPoint2DFloat()
Get the point as a Point2D.Float object. |
boolean |
getTransformedFlag()
Get the transformed flag of the point. |
double |
getV()
Get the v-value of the point. |
double |
getW()
Get the w-value of the point. |
double |
getX()
Returns the x-coordinate of this ChartPoint3D . |
double |
getY()
Returns the y-coordinate of this ChartPoint3D . |
double |
getZ()
Returns the z-coordinate of this ChartPoint3D in double precision. |
static boolean |
isEqual(ChartPoint3D A,
ChartPoint3D B)
Exact Equality test. |
static boolean |
isEqual(ChartPoint3D A,
ChartPoint3D B,
double tolerance)
Exact Equality test within the specified tolerance. |
void |
normalize()
Normalize the 3D point using the w-value. |
void |
setLocation(ChartPoint3D p)
Sets the location of this ChartPoint3D to the same coordinates as the specified ChartPoint3D object. |
void |
setLocation(double px,
double py)
Sets the location of this ChartPoint3D to the specified double coordinates. |
void |
setLocation(double px,
double py,
double pz)
Sets the location of this ChartPoint3D to the specified double coordinates. |
void |
setNewStart(boolean value)
Set the newStartv-value of the point. |
void |
setTransformedFlag(boolean value)
Set the ntransformed flag of the point. |
void |
setV(double value)
Set the v-value of the point. |
void |
setW(double value)
Set the w-value of the point. |
void |
setX(double value)
Sets the x-coordinate of this ChartPoint3D . |
void |
setY(double value)
Sets the y-coordinate of this ChartPoint3D . |
void |
setZ(double value)
Sets the z-coordinate of this ChartPoint3D in double precision. |
Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
---|
copy, errorCheck, getChartObjIDCntr, getChartObjType, getThisChartObjID |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double x
Double
class defines a point specified in double
precision.
public double y
ChartPoint3D
.
public double z
ChartPoint3D
.
public double w
Point3D
.
public double v
Point3D
.
Constructor Detail |
---|
public ChartPoint3D()
public ChartPoint3D(double px, double py, double pz)
ChartPoint3D
with the specified coordinates.
px
- the x-coordinatepy
- the y-coordinatepz
- the z-coordinatepublic ChartPoint3D(double px, double py)
ChartPoint3D
with the specified coordinates.
px
- the x-coordinatepy
- the y-coordinatepublic ChartPoint3D(double px, double py, double pz, double pw)
ChartPoint3D
with the specified coordinates.
px
- the x-coordinatepy
- the y-coordinatepz
- the z-coordinatepw
- the w-coordinatepublic ChartPoint3D(ChartPoint3D p)
ChartPoint3D
with the specified coordinates.
p
- the sourc epointMethod Detail |
---|
public double getX()
ChartPoint3D
.
ChartPoint3D
.public double getY()
ChartPoint3D
.
ChartPoint3D
.public double getZ()
ChartPoint3D
in double
precision.
ChartPoint3D
.public void setX(double value)
ChartPoint3D
.
value
- Sets the x-coordinate of this ChartPoint3D
public void setY(double value)
ChartPoint3D
.
value
- Sets the y-coordinate of this ChartPoint3D
public void setZ(double value)
ChartPoint3D
in double
precision.
value
- Sets the z-coordinate of this ChartPoint3D
public void setLocation(double px, double py, double pz)
ChartPoint3D
to the specified double
coordinates.
px
- the x-coordinatepy
- the y-coordinatepz
- the z-coordinatepublic void setLocation(double px, double py)
ChartPoint3D
to the specified double
coordinates.
px
- the x-coordinatepy
- the y-coordinatepublic void setLocation(ChartPoint3D p)
ChartPoint3D
to the same coordinates as the specified ChartPoint3D
object.
p
- the source coordinatespublic static double distanceSq(double X1, double Y1, double Z1, double X2, double Y2, double Z2)
X1
- the x-coordinate of the first pointY1
- the y-coordinate of the first pointZ1
- the z-coordinate of the first pointX2
- the x-coordinate of the second pointY2
- the y-coordinate of the second pointZ2
- the z-coordinate of the second point
public static double distance(double X1, double Y1, double Z1, double X2, double Y2, double Z2)
X1
- the x-coordinate of the first pointY1
- the y-coordinate of the first pointZ1
- the z-coordinate of the first pointX2
- the x-coordinate of the second pointY2
- the y-coordinate of the second pointZ2
- the z-coordinate of the second point
public double distanceSq(double PX, double PY, double PZ)
ChartPoint3D
to a specified point.
PX
- the x-coordinate of the other pointPY
- the y-coordinate of the other pointPZ
- the z-coordinate of the other point
ChartPoint3D
and the specified point.public double distanceSq(ChartPoint3D pt)
ChartPoint3D
to a specified ChartPoint3D
.
pt
- the specified ChartPoint3D
ChartPoint3D
to a specified ChartPoint3D
.public double distance(double PX, double PY, double PZ)
ChartPoint3D
to a specified point.
PX
- the x-coordinate of the other pointPY
- the y-coordinate of the other pointPZ
- the z-coordinate of the other point
ChartPoint3D
and a specified point.public double distance(ChartPoint3D pt)
ChartPoint3D
to a specified ChartPoint3D
.
pt
- the specified ChartPoint3D
ChartPoint3D
and the specified ChartPoint3D
.public java.lang.Object clone()
clone
in class java.lang.Object
public void normalize()
public static boolean isEqual(ChartPoint3D A, ChartPoint3D B)
A
- Argument 1B
- Argument 2
public static boolean isEqual(ChartPoint3D A, ChartPoint3D B, double tolerance)
A
- Argument 1B
- Argument 2tolerance
- If objects are equal within this tolerance
public double getW()
public void setW(double value)
value
- Set the w-value of the point.public double getV()
public void setV(double value)
value
- Set the v-value of the point.public boolean getNewStart()
public void setNewStart(boolean value)
value
- Set the newStartv-value of the point.public boolean getTransformedFlag()
public void setTransformedFlag(boolean value)
value
- Set the transformed flag of the point.public java.awt.geom.Point2D.Double getPoint2DDouble()
public java.awt.geom.Point2D.Float getPoint2DFloat()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |