visad.bom.annotations
Class PointJ3D
- java.lang.Object
-
- visad.bom.annotations.PointJ3D
-
- All Implemented Interfaces:
- ScreenAnnotation
public class PointJ3D extends java.lang.Object implements ScreenAnnotation
Meant to encapsulate information representing a Point 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.
-
-
Constructor Summary
Constructors Constructor and Description PointJ3D()Simple constructor which makes a point at (0, 0) coloured white.PointJ3D(int[][] points, float[] colour, double zValue, double thickness)Constructs a PointJ3D from specified values in screen coordinates.PointJ3D(int x1, int y1, float[] colour, double zValue, double thickness)Constructs a PointJ3D from specified values in screen coordinates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidsetColour(float[] colour)Set colour for the PointJ3D.voidsetPointJ3Ds(int[][] points)Set coordinates for the PointJ3D.voidsetPointJ3Ds(int x1, int y1)Set coordinates for the PointJ3D.voidsetZValue(double zValue)Set Z position for the PointJ3D.java.lang.ObjecttoDrawable(DisplayImpl display)Make the PointJ3D into aShape3D.
-
-
-
Constructor Detail
-
PointJ3D
public PointJ3D()
Simple constructor which makes a point at (0, 0) coloured white. More meaningful values can be set after construction.
-
PointJ3D
public PointJ3D(int x1, int y1, float[] colour, double zValue, double thickness)Constructs a PointJ3D from specified values in screen coordinates.- Parameters:
x1- x screen coordinate of the point.y1- y screen coordinate of the 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 the size of the point.
-
PointJ3D
public PointJ3D(int[][] points, float[] colour, double zValue, double thickness)Constructs a PointJ3D from specified values in screen coordinates.- Parameters:
points- 2 rows with each column containing a point in screen coordinates; requires 1 point (column).colour- red green blue triple; each value in [0.0, 1.0].zValue- Virtual world value; larger z is in front.thickness- used for the size of the point.
-
-
Method Detail
-
setPointJ3Ds
public void setPointJ3Ds(int x1, int y1)Set coordinates for the PointJ3D.- Parameters:
x1- x screen coordinate of the point.y1- y screen coordinate of the point.
-
setPointJ3Ds
public void setPointJ3Ds(int[][] points)
Set coordinates for the PointJ3D.- Parameters:
points- 2 rows with each column containing a point in screen coordinates; requires 1 point (column).
-
setColour
public void setColour(float[] colour)
Set colour for the PointJ3D.- Parameters:
colour- red green blue triple; each value in [0.0, 1.0].
-
setZValue
public void setZValue(double zValue)
Set Z position for the PointJ3D.- Parameters:
zValue- Virtual world value; larger z is in front.
-
toDrawable
public java.lang.Object toDrawable(DisplayImpl display)
Make the PointJ3D into aShape3D.- Specified by:
toDrawablein interfaceScreenAnnotation- Parameters:
display- the VisAD display for this Point.- Returns:
- the Triangle description as a Shape3D object.
-
-
DMelt 3.0 © DataMelt by jWork.ORG