lt.monarch.math.geom
Class Line3D

java.lang.Object
  extended by java.awt.geom.Line2D
      extended by java.awt.geom.Line2D.Double
          extended by lt.monarch.math.geom.Line2D
              extended by lt.monarch.math.geom.Line3D
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable, Primitive, Primitive2D, Primitive3D
Direct Known Subclasses:
AxisLine3D

public class Line3D
extends Line2D
implements Primitive3D

See Also:
Serialized Form

Nested Class Summary
Modifier and Type Class and Description
 
Nested classes/interfaces inherited from class java.awt.geom.Line2D
java.awt.geom.Line2D.Double, java.awt.geom.Line2D.Float
 
Field Summary
Modifier and Type Field and Description
 java.awt.Color color
          The color value.
 double z1
          First z coordinate
 double z2
          Second z coordinate
 
Fields inherited from class java.awt.geom.Line2D.Double
x1, x2, y1, y2
 
Constructor Summary
Constructor and Description
Line3D()
          Constructs 3D line
Line3D(double x1, double y1, double z1, double x2, double y2, double z2)
          Constructs 3D line
Line3D(Point3D pt1, Point3D pt2)
          Constructs 3D line
 
Method Summary
Modifier and Type Method and Description
 java.util.List<Point3D> get3DPoints()
          Gets a list of 3D points
 java.awt.Color getColor()
          Retrieves a color value.
 int getSelectionId()
          Gets associated chart obejct id
 void setColor(java.awt.Color color)
          Sets the color value.
 void setLine(Point3D p1, Point3D p2)
          Sets the location of the end points of this Line3D to the specified Point3D coordinates.
 void setSelectionID(int id)
          Sets associated chart object id
 
Methods inherited from class lt.monarch.math.geom.Line2D
contains, dispose, finalize, get2DPoints, getIntersection
 
Methods inherited from class java.awt.geom.Line2D.Double
getBounds2D, getP1, getP2, getX1, getX2, getY1, getY2, setLine
 
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lt.monarch.math.geom.Primitive
dispose, getBounds2D
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects
 

Field Detail

z1

public double z1
First z coordinate


z2

public double z2
Second z coordinate


color

public java.awt.Color color
The color value.

Constructor Detail

Line3D

public Line3D()
Constructs 3D line


Line3D

public Line3D(Point3D pt1,
              Point3D pt2)
Constructs 3D line

Parameters:
pt1 - beginning of the line
pt2 - end of the line

Line3D

public Line3D(double x1,
              double y1,
              double z1,
              double x2,
              double y2,
              double z2)
Constructs 3D line

Parameters:
x1 - first x coordinate
y1 - first y coordinate
z1 - first z coordinate
x2 - last x coordinate
y2 - last y coordinate
z2 - last z coordinate
Method Detail

setColor

public void setColor(java.awt.Color color)
Sets the color value.

Parameters:
color - - the color

getColor

public java.awt.Color getColor()
Retrieves a color value.

Returns:
- the color

setLine

public void setLine(Point3D p1,
                    Point3D p2)
Sets the location of the end points of this Line3D to the specified Point3D coordinates.

Parameters:
p1 - the start Point3D of the line segment
p2 - the end Point3D of the line segment

get3DPoints

public java.util.List<Point3D> get3DPoints()
Description copied from interface: Primitive3D
Gets a list of 3D points

Specified by:
get3DPoints in interface Primitive3D
Returns:
list of 3D points

setSelectionID

public void setSelectionID(int id)
Sets associated chart object id

Specified by:
setSelectionID in interface Primitive3D
Parameters:
if - chart object id

getSelectionId

public int getSelectionId()
Gets associated chart obejct id

Specified by:
getSelectionId in interface Primitive3D
Returns:
chart object id