public class LineJ3D extends Object implements ScreenAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
DASH
line style DASH
|
static int |
DASH_DOT
line style DASH_DOT
|
static int |
DOT
line style DOT
|
static int |
SOLID
line style SOLID
|
Constructor and Description |
---|
LineJ3D()
Simple constructor which makes a zero length line at (0, 0)
coloured white.
|
LineJ3D(int style,
int[][] points,
float[] colour,
double zValue,
double thickness)
Constructs a LineJ3D from 2 points specified in screen coordinates.
|
LineJ3D(int x1,
int y1,
int x2,
int y2,
float[] colour,
double zValue,
double thickness)
Constructs a solid LineJ3D from 2 points specified
in screen coordinates.
|
LineJ3D(int style,
int x1,
int y1,
int x2,
int y2,
float[] colour,
double zValue,
double thickness)
Constructs a LineJ3D from 2 points specified
in screen coordinates.
|
Modifier and Type | Method and Description |
---|---|
void |
setColour(float[] colour)
Set the colour for the LineJ3D.
|
void |
setPoints(int[][] points)
Set the coordinates for the start and end points of the LineJ3D.
|
void |
setPoints(int x1,
int y1,
int x2,
int y2)
Set the coordinates for the start and end points of the LineJ3D.
|
void |
setStyle(int style)
Set the line style for the LineJ3D.
|
void |
setZValue(double zValue)
Set the Z value for the LineJ3D.
|
Object |
toDrawable(DisplayImpl display)
Make the LineJ3D into a
Shape3D . |
public static final int SOLID
public static final int DASH
public static final int DOT
public static final int DASH_DOT
public LineJ3D()
public LineJ3D(int x1, int y1, int x2, int y2, float[] colour, double zValue, double thickness)
x1
- x screen coordinate of the first point.y1
- y screen coordinate of the first point.x2
- x screen coordinate of the second point.y2
- y screen coordinate of the second point.colour
- red green blue triple; each value in [0.0, 1.0].zValue
- Virtual world value; larger z is in front.thickness
- of the line.public LineJ3D(int style, int[][] points, float[] colour, double zValue, double thickness)
style
- one of: points
- 2 rows with each column containing a point
in screen coordinates; requires 2 points (columns).colour
- red green blue triple; each value in [0.0, 1.0].zValue
- Virtual world value; larger z is in frontthickness
- of the line.public LineJ3D(int style, int x1, int y1, int x2, int y2, float[] colour, double zValue, double thickness)
style
- one of: x1
- x screen coordinate of the first point.y1
- y screen coordinate of the first point.x2
- x screen coordinate of the second point.y2
- y screen coordinate of the second point.colour
- red green blue triple; each value in [0.0, 1.0].zValue
- Virtual world value; larger z is in front.thickness
- of the line.public void setPoints(int x1, int y1, int x2, int y2)
x1
- x screen coordinate of the first point.y1
- y screen coordinate of the first point.x2
- x screen coordinate of the second point.y2
- y screen coordinate of the second point.public void setPoints(int[][] points)
points
- 2 rows with each column containing a point
in screen coordinates; requires 2 points (columns).public void setStyle(int style)
style
- one of: public void setColour(float[] colour)
colour
- red green blue triple; each value in [0.0, 1.0].public void setZValue(double zValue)
zValue
- Virtual world value; larger z is in front.public Object toDrawable(DisplayImpl display)
Shape3D
.toDrawable
in interface ScreenAnnotation
display
- the VisAD display for this Line.Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.