public class PrintVRML extends Object
Specifically, PrintVRML sends VRML strings for various header, DirectionalLight, NavigationInfo, Viewpoint and legend-building PROTO nodes to standard output.
Contact: Don Brutzman (web.nps.navy.mil/~brutzman) brutzman@nps.navy.mil
15 Jan 98 | Timothy M. Holliday | New |
14 May 98 | Timothy M. Holliday | Added color and intensity schemes |
18 May 98 | Timothy M. Holliday | Added VRML colorBarView and textNode |
10 Oct 98 | Don Brutzman | Javadoc updates for jdk1.2b4
Fixed PROTO initialization/repetition problems |
26 April 99 | Don Brutzman | Javadoc updates for jdk1.2.1, revised some method names to match get/set naming convention. |
Bottom
,
Surface
,
SSP
,
Lobe
Modifier and Type | Field and Description |
---|---|
static int |
BLUE
color code value is 4
|
static String |
CENTER
string MIDDLE
|
static int |
CONSTANT
color code value is 6
|
static int |
GREEN
color code value is 3
|
static String |
HORIZONTAL
string transform value for VRML
|
static String |
LEFT
string BEGIN
|
static int |
LINEAR
color code value is 7
|
int |
protoColorBarCount
int value for count of proto color
|
static boolean |
protoLegendViewpointFirstInvocation
boolean for the first setting for VRML viewpoint node
|
static int |
RAINBOW
color code value is 1
|
static int |
RED
color code value is 2
|
static String |
RIGHT
string END
|
static int |
TRICOLOR
color code value is 5
|
static String |
VERTICAL
string transform valur for VRML
|
Constructor and Description |
---|
PrintVRML() |
Modifier and Type | Method and Description |
---|---|
String |
colorBar(String verticalLabel,
String horizontalLabel,
String detectionLabel,
String counterDetectionLabel)
Produce colorbar; only includes detectionLabel and counterDetectionLabel if
colorScheme is case TRICOLOR.
|
boolean |
getAppendLineFeed()
Return what character is used for end-of-line.
|
String |
getBackground()
Return Background node with default values.
|
String |
getBackground(double r,
double g,
double b)
Return Background node with specified (r, g, b) values.
|
String |
getColor()
Return color value for current point based on color scheme.
|
String |
getColorBarViewpoint(String title,
double x,
double y,
double z,
double xAxis,
double yAxis,
double zAxis,
double theta)
Return colorBar Viewpoint node, requires protoColorBar for initialization first.
|
String |
getLegendViewpoint(String title,
String info1,
String info2,
String info3,
String info4,
String info5,
double x,
double y,
double z)
Initialization prior to producing viewpoint for scene legend (color scales and description),
by defining a PROTO node.
|
String |
getScaleGeometry(String label,
double maximum,
double minimum,
double x,
double y,
double z,
double xAxis,
double yAxis,
double zAxis,
double theta,
int divisions)
Return VRML string for the in-scene spatial scale.
|
String |
getSceneHeader()
Return standard VRML file header, DirectionalLight, NavigationInfo.
|
String |
protoColorBar(String verticalLabel,
String horizontalLabel,
String vSubLabel1,
String vSubLabel2)
Return another sequentially numbered protoColorBar.
|
void |
setAppendLineFeed(boolean pAppendLineFeed)
Specify whether linefeeds are appended to lines.
|
void |
setColorScheme(int scheme)
Default stub to set counterdetection color scheme - needs work.
|
void |
setColorScheme(int scheme,
double maximum,
double minimum)
User-selectable stub to set counterdetection color scheme - needs work.
|
void |
setColorScheme(int scheme,
double maximum,
double detection,
double counterDetection,
double minimum)
User-selectable stub to set counterdetection color scheme - needs work.
|
void |
setColorValue(double value)
Set color intensity if capped.
|
void |
setIntensityScheme(int scheme)
User-selectable stub to set color intensity scheme, current values for scheme are
LINEAR and CONSTANT - needs work.
|
void |
setIntensityScheme(int scheme,
double maximum,
double minimum)
User-selectable stub to set color intensity scheme, current values for scheme are
LINEAR and CONSTANT - needs work.
|
void |
setIntensityValue(double value)
Intensity factor is multiplied against all color components.
|
public static final int RAINBOW
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int TRICOLOR
public static final int CONSTANT
public static final int LINEAR
public static final String HORIZONTAL
public static final String VERTICAL
public static final String RIGHT
public static final String CENTER
public static final String LEFT
public static boolean protoLegendViewpointFirstInvocation
public int protoColorBarCount
public String getSceneHeader()
public String getBackground()
public String getBackground(double r, double g, double b)
r
- the rgb color code rg
- the rgb color code gb
- the rgb color code bpublic String getLegendViewpoint(String title, String info1, String info2, String info3, String info4, String info5, double x, double y, double z)
title
- title of String.info1
- infor 1 for EXTERNPROTO protoLegendViewpoint nodeinfo2
- infor 2 for EXTERNPROTO protoLegendViewpoint nodeinfo3
- infor 3 for EXTERNPROTO protoLegendViewpoint nodeinfo4
- infor 4 for EXTERNPROTO protoLegendViewpoint nodeinfo5
- infor 5 for EXTERNPROTO protoLegendViewpoint nodex
- x coordinate for EXTERNPROTO protoLegendViewpoint nodey
- y coordinate for EXTERNPROTO protoLegendViewpoint nodez
- z coordinate for EXTERNPROTO protoLegendViewpoint nodepublic String protoColorBar(String verticalLabel, String horizontalLabel, String vSubLabel1, String vSubLabel2)
verticalLabel
- vertical label for PROTO protoColorBar node.horizontalLabel
- vertical label for PROTO protoColorBar node.vSubLabel1
- label for Transform children node.vSubLabel2
- label for Transform children node.public String getColorBarViewpoint(String title, double x, double y, double z, double xAxis, double yAxis, double zAxis, double theta)
title
- viewpoint title.x
- coordinate x for Transform translation node.y
- coordinate y for Transform translation node.z
- coordinate z for Transform translation node.xAxis
- coordinate xAxis for Transform rotation node.yAxis
- coordinate yAxis for Transform rotation node.zAxis
- coordinate zAxis for Transform rotation node.theta
- theta value for Transform rotation node.public void setAppendLineFeed(boolean pAppendLineFeed)
pAppendLineFeed
- 'true' is LINE_FEED or 'false' is SPACE.public boolean getAppendLineFeed()
public void setColorScheme(int scheme)
scheme
- color scheme.public void setColorScheme(int scheme, double maximum, double minimum)
scheme
- color scheme.maximum
- maximum of color.minimum
- minimum of color.public void setColorScheme(int scheme, double maximum, double detection, double counterDetection, double minimum)
scheme
- color scheme.maximum
- maximum color.detection
- color detection.counterDetection
- counterdetection for color scheme.minimum
- minimum color for Delta.public void setColorValue(double value)
value
- color intensity.public void setIntensityScheme(int scheme)
scheme
- color scheme.public void setIntensityScheme(int scheme, double maximum, double minimum)
scheme
- color scheme.maximum
- maximu of color intensity.minimum
- minimum of color intensity.public void setIntensityValue(double value)
value
- intensity value.public String getColor()
public String colorBar(String verticalLabel, String horizontalLabel, String detectionLabel, String counterDetectionLabel)
verticalLabel
- String text.horizontalLabel
- String text.detectionLabel
- String text.counterDetectionLabel
- String text.public String getScaleGeometry(String label, double maximum, double minimum, double x, double y, double z, double xAxis, double yAxis, double zAxis, double theta, int divisions)
label
- String label formaximum
- maximum value for Transform point node.minimum
- minimum value for Transform point node.x
- coordinate x for Transform node.y
- coordinate y for Transform node.z
- coordinate z for Transform node.xAxis
- coordinate xAxis for Transform translation node.yAxis
- coordinate yAxis for Transform translation node.zAxis
- coordinate zAxis for Transform translation node.theta
- theta value for for Transform translation node.divisions
- int divisions value.