org.fixbin.ddd
Class Line

java.lang.Object
  extended byorg.fixbin.ddd.Line
All Implemented Interfaces:
Object3D

public class Line
extends java.lang.Object
implements Object3D

This class implements a 3D Object type "Line" which consists of two points. This class can be used for wireframe models.


Constructor Summary
Line(Point p1, Point p2)
          Creates a new instance of Line
 
Method Summary
 long getDistance()
          Returns the distance (not really required for wireframes)
 void render(Graphics g)
          Renders the line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line(Point p1,
            Point p2)
Creates a new instance of Line

Parameters:
p1 - (Point) the first point
p2 - (Point) the second point
Method Detail

getDistance

public long getDistance()
Returns the distance (not really required for wireframes)

Specified by:
getDistance in interface Object3D
Returns:
the distance (long)

render

public void render(Graphics g)
Renders the line

Specified by:
render in interface Object3D
Parameters:
g - (Graphics) the graphics interface to render to