|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.bom.annotations.TriangleJ3D
public class TriangleJ3D
Meant to encapsulate information representing a Triangle which is going to be rendered on a VisAD display without being subject to the usual VisAD transformations. Thus the label should stick in Screen Coordinates.
Field Summary | |
---|---|
static int |
FILL
fill style FILL |
static int |
LINE
fill style LINE |
static int |
POINT
fill style POINT |
Constructor Summary | |
---|---|
TriangleJ3D()
Simple constructor which makes a zero size triangle at (0, 0) coloured white. |
|
TriangleJ3D(int style,
int[][] points,
float[] colour,
double zValue,
double thickness)
Constructs a TriangleJ3D from 3 points specified in screen coordinates. |
|
TriangleJ3D(int style,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
float[] colour,
double zValue,
double thickness)
Constructs a TriangleJ3D from 3 points specified in screen coordinates. |
Method Summary | |
---|---|
void |
setColour(float[] colour)
Set the colour of the triangle. |
void |
setPoints(int[][] points)
Sets TriangleJ3D from the given array of 3 points specified in screen coordinates. |
void |
setPoints(int x1,
int y1,
int x2,
int y2,
int x3,
int y3)
Sets TriangleJ3D from 3 points specified in screen coordinates. |
void |
setStyle(int style)
Set the drawing style of the triangle. |
void |
setZValue(double zValue)
Set the Z value of the triangle. |
Object |
toDrawable(DisplayImpl display)
Make the TriangleJ3D into a Shape3D . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int POINT
public static final int LINE
public static final int FILL
Constructor Detail |
---|
public TriangleJ3D()
public TriangleJ3D(int style, int x1, int y1, int x2, int y2, int x3, int y3, 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.x3
- x screen coordinate of the third point.y3
- y screen coordinate of the third point.colour
- red green blue triple; each value in [0.0, 1.0].zValue
- Virtual world value; larger z is in front.thickness
- used for outline thickness and point size.public TriangleJ3D(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 3 points (columns).colour
- red green blue triple; each value in [0.0, 1.0].zValue
- Virtual world value; larger z is in front.thickness
- used for outline thickness and point size.Method Detail |
---|
public void setPoints(int x1, int y1, int x2, int y2, int x3, int y3)
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.x3
- x screen coordinate of the third point.y3
- y screen coordinate of the third point.public void setPoints(int[][] points)
points
- 2 rows with each column containing a point
in screen coordinates; requires 3 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 zValue is in front.public Object toDrawable(DisplayImpl display)
Shape3D
.
toDrawable
in interface ScreenAnnotation
display
- the VisAD display for this Triangle.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |