jRenderer3D
Class Line3D

java.lang.Object
  extended by jRenderer3D.Line3D

public class Line3D
extends java.lang.Object

This class represents a line in 3D coordinate system. It is defined by its start point (x1, y1, z1) and its end point (x2, y2, z2), and its color.

At the moment it is not possible to set line width.

Author:
Kai Uwe Barthel

Field Summary
 int color
          color of line (hex)
 int x1
          x coordinate of start point
 int x2
          x coordinate of end point
 int y1
          y coordinate of start point
 int y2
          y coordinate of end point
 int z1
          z coordinate of start point
 int z2
          z coordinate of end point
 
Constructor Summary
Line3D()
          Creates a new lines3D object.
Line3D(int[] p1, int[] p2, java.awt.Color color)
          Creates a new lines3D object with start point, end point and color of the line
Line3D(int[] p1, int[] p2, int rgb)
          Creates a new lines3D object with start point, end point and color of the line
Line3D(int x1, int y1, int z1, int x2, int y2, int z2, java.awt.Color color)
          Creates a new lines3D object with start point, end point and color of the line
Line3D(int x1, int y1, int z1, int x2, int y2, int z2, int rgb)
          Creates a new lines3D object with start point, end point and color of the line
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x1

public int x1
x coordinate of start point


y1

public int y1
y coordinate of start point


z1

public int z1
z coordinate of start point


x2

public int x2
x coordinate of end point


y2

public int y2
y coordinate of end point


z2

public int z2
z coordinate of end point


color

public int color
color of line (hex)

Constructor Detail

Line3D

public Line3D()
Creates a new lines3D object. No parameters are set.


Line3D

public Line3D(int x1,
              int y1,
              int z1,
              int x2,
              int y2,
              int z2,
              int rgb)
Creates a new lines3D object with start point, end point and color of the line

Parameters:
x1 - - x coordinate of start point
y1 - - y coordinate of start point
z1 - - z coordinate of start point
x2 - - x coordinate of end point
y2 - - y coordinate of end point
z2 - - z coordinate of end point
rgb - - color of line (hex)

Line3D

public Line3D(int x1,
              int y1,
              int z1,
              int x2,
              int y2,
              int z2,
              java.awt.Color color)
Creates a new lines3D object with start point, end point and color of the line

Parameters:
x1 - - x coordinate of start point
y1 - - y coordinate of start point
z1 - - z coordinate of start point
x2 - - x coordinate of end point
y2 - - y coordinate of end point
z2 - - z coordinate of end point
color - - color of line

Line3D

public Line3D(int[] p1,
              int[] p2,
              int rgb)
Creates a new lines3D object with start point, end point and color of the line

Parameters:
p1 - start point int[3]
p2 - start point int[3]
rgb - color of the line (int)

Line3D

public Line3D(int[] p1,
              int[] p2,
              java.awt.Color color)
Creates a new lines3D object with start point, end point and color of the line

Parameters:
p1 - start point int[3]
p2 - start point int[3]
color - color of the line