EspressChart
v 5.5

quadbase.util
Interface I3DPropertySet


public interface I3DPropertySet

This interface is used to set properties controlling the navigation, illumination model, etc. of a 3D chart. A handle to this interface can be obtained by calling the geth3DProperties method in QbChart.


Field Summary
static int DOWN
           
static int LEFT
           
static int RIGHT
           
static int UP
          direction constants (UP, DOWN, LEFT, RIGHT) for moving the chart
 
Method Summary
 java.awt.Color getAmbientLight()
          This function returns the ambient color value used for shading.
 int getAnimationSpeed()
          This function returns the animation speed for the navigation panel.
 int getApproximationThreshold()
          This method returns the threshold value of 3D rendering approximation.
 float getBarWidthToThicknessRatio()
          This function returns the width to thickness ratio for a bar/line 3D chart.
 ColorSpectrum getColorSpectrum()
          This function returns the color spectrum being used.
 java.awt.Color getLight()
          Returns the intensity of the light source used for shading.
 Point_3D getLightPosition()
          This function gets the light position for shading.
 int getRenderMode()
          This function returns the 3D rendering mode.
 int getScatterCubeWidth()
          This function returns the width of the cube for a scatter 3D chart.
 Point_3D[] getViewDirection()
          Returns the viewpoint values for a 3D chart.
 Point_3D getViewTranslation()
          Returns the view translation coordinates.
 java.awt.Color getWallColor()
          This function returns the color used to draw the xy,yz,xz walls for a 3D chart.
 float getXScale()
          Returns the X dimension scaling used for a 3D chart.
 float getYScale()
          Returns the Y dimension scaling used for a 3D chart.
 int getZoomFactor()
          Returns the zoom factor used for viewing a 3D chart.
 float getZScale()
          Returns the Z dimension scaling used for a 3D chart.
 boolean is3DApproximationUsed()
          This function returns whether a 3D rendering approximation method is currently used.
 boolean isDrawSeriesOnCategoryAxis()
          Determines whether or not drawing series on category axis in 3 dimension space.
 boolean isWallFrameVisible()
          Returns whether or not a wireframe is drawn around the 3 walls of a 3D chart.
 void move(boolean rotateMode, int step, int direction)
          This function can move the chart in 4 different directions
 void set3DApproximationUsed(boolean state)
          This function sets the state of 3D rendering approximation.
 void set3DApproximationUsed(boolean state, int threshold)
          This function sets the state of 3D rendering approximation.
 void setAmbientLight(java.awt.Color c)
          This function sets an ambient color for shading.
 void setAnimationSpeed(int value)
          This function sets the animation speed for the navigation panel in radians per frame.
 void setBarWidthToThicknessRatio(float d)
          This function sets the width to thickness ratio for a bar/line 3D chart.
 void setColorSpectrum(ColorSpectrum colorSpectrum)
          This function sets the data color based on the vertical value Currently only 3D surface chart supports this feature.
 void setDrawSeriesOnCategoryAxis(boolean b)
          Set drawing series on category axis in 3 dimension space.
 void setLight(java.awt.Color light)
          Sets the light source intensity used for shading.
 void setLightPosition(Point_3D x)
          This function sets the light position for shading.
 void setRenderMode(int mode)
          This function sets the 3D rendering mode.
 void setScatterCubeWidth(int d)
          This function sets the width of the cube for a scatter 3D chart.
 void setViewDirection(Point_3D[] x)
          This function sets viewpoint for a 3D chart.
 void setViewTranslation(Point_3D x)
          This function sets the view translation of the chart from the center.
 void setWallColor(java.awt.Color c)
          This function sets the color used to draw the xy,yz, and xz walls in a 3D chart.
 void setWallFrameVisible(boolean b)
          Enables/Disables a wireframe around the 3 walls for a 3D chart.
 void setXScale(float scale)
          This function sets the X dimension scale factor for a 3D chart.
 void setYScale(float scale)
          This function sets the Y dimension scale factor for a 3D chart.
 void setZoomFactor(int f)
          This function sets the viewing zoom factor for a 3D chart.
 void setZScale(float scale)
          This function sets the Z dimension scale factor for a 3D chart.
 void useDefault3DDisplayView()
          Use default 3D Display View angle and scale
 

Field Detail

UP

public static final int UP
direction constants (UP, DOWN, LEFT, RIGHT) for moving the chart

DOWN

public static final int DOWN

LEFT

public static final int LEFT

RIGHT

public static final int RIGHT
Method Detail

getAnimationSpeed

public int getAnimationSpeed()
This function returns the animation speed for the navigation panel.

Associated QbChart property: ANIMATE_SPEED

Returns:
The animation speed (between 1 and 100).

setAnimationSpeed

public void setAnimationSpeed(int value)
This function sets the animation speed for the navigation panel in radians per frame.
Parameters:
value - The animation speed (should be between 1 and 100).
See Also:
getAnimationSpeed()

setRenderMode

public void setRenderMode(int mode)
This function sets the 3D rendering mode.

Associated QbChart property: DRAWMODE_3D

Parameters:
mode - The rendering mode: Options are:
   QbChart.FLAT
   QbChart.WIREFRAME
   QbChart.FLAT_BORDER
   QbChart.GOURAUD_BORDER
   QbChart.GOURAUD
 

getRenderMode

public int getRenderMode()
This function returns the 3D rendering mode.
Returns:
The 3D rendering mode.
See Also:
setRenderMode(int)

setViewDirection

public void setViewDirection(Point_3D[] x)
This function sets viewpoint for a 3D chart.

Associated QbChart property: VIEWPOINT

Parameters:
x - An array (size 2) of Point_3D objects containing the start and end x,y,z coordinates which define the viewpoint.
See Also:
Point_3D

getViewDirection

public Point_3D[] getViewDirection()
Returns the viewpoint values for a 3D chart.
Returns:
An array of Point_3D objects containing the viewpoint.
See Also:
setViewDirection(quadbase.util.Point_3D[]), Point_3D

setViewTranslation

public void setViewTranslation(Point_3D x)
This function sets the view translation of the chart from the center.

Associated QbChart property: VIEW_TRANSLATION

Parameters:
x - The Point_3D object containing the x,y,z coordinates for the translation.
See Also:
Point_3D

move

public void move(boolean rotateMode,
                 int step,
                 int direction)
This function can move the chart in 4 different directions

Parameters:
rotateMode - If rotateMode is true, rotate a chart along with direction If rotateMode is false, translate a chart along with direction
step - Step interval
direction - Options are:
	I3DPropertySet.UP
	I3DPropertySet.DOWN
	I3DPropertySet.LEFT
	I3DPropertySet.RIGHT
 

getViewTranslation

public Point_3D getViewTranslation()
Returns the view translation coordinates.
Returns:
The Point_3D object containing the view translation coords.
See Also:
Point_3D

setLightPosition

public void setLightPosition(Point_3D x)
This function sets the light position for shading.

Associated QbChart property: LIGHT_POSITION

Parameters:
x - The Point_3D object containing the x,y,z coordinates of the light position.
See Also:
Point_3D

getLightPosition

public Point_3D getLightPosition()
This function gets the light position for shading.
Returns:
The Point_3D object containing the view translation coords.
See Also:
Point_3D

getAmbientLight

public java.awt.Color getAmbientLight()
This function returns the ambient color value used for shading.
Returns:
The ambient Color object.
See Also:
Color

setAmbientLight

public void setAmbientLight(java.awt.Color c)
This function sets an ambient color for shading.

Associated QbChart property: AMBIENT_COLOR

Parameters:
c - The color value to use.
See Also:
Color

getLight

public java.awt.Color getLight()
Returns the intensity of the light source used for shading.
Returns:
The light color used for shading.

setLight

public void setLight(java.awt.Color light)
Sets the light source intensity used for shading.

Associated QbChart property: LIGHT_INTENSITY

Parameters:
light - The light intensity to use.

getZoomFactor

public int getZoomFactor()
Returns the zoom factor used for viewing a 3D chart.
Returns:
The zoom factor (0 - 100).

setZoomFactor

public void setZoomFactor(int f)
This function sets the viewing zoom factor for a 3D chart.

Associated QbChart property: ZOOM_FACTOR

Parameters:
f - The zoom factor to use (0 - 100).

getXScale

public float getXScale()
Returns the X dimension scaling used for a 3D chart.
Returns:
The X dimension scale factor.

setXScale

public void setXScale(float scale)
This function sets the X dimension scale factor for a 3D chart.

Associated QbChart property: SPACE_XSCALE

Parameters:
scale - The X scale factor to use.

getYScale

public float getYScale()
Returns the Y dimension scaling used for a 3D chart.
Returns:
The Y dimension scale factor.

setYScale

public void setYScale(float scale)
This function sets the Y dimension scale factor for a 3D chart.

Associated QbChart property: SPACE_YSCALE

Parameters:
scale - The Y scale factor to use.

getZScale

public float getZScale()
Returns the Z dimension scaling used for a 3D chart.
Returns:
The Z dimension scale factor.

setZScale

public void setZScale(float scale)
This function sets the Z dimension scale factor for a 3D chart.

Associated QbChart property: SPACE_ZSCALE

Parameters:
scale - The Z scale factor to use.

getBarWidthToThicknessRatio

public float getBarWidthToThicknessRatio()
This function returns the width to thickness ratio for a bar/line 3D chart.
Returns:
The width to thickness ratio.

setBarWidthToThicknessRatio

public void setBarWidthToThicknessRatio(float d)
This function sets the width to thickness ratio for a bar/line 3D chart.

Associated QbChart property: THICKNESS_RATIO

Parameters:
d - The width-thickness ratio to use while drawing the bars.

getScatterCubeWidth

public int getScatterCubeWidth()
This function returns the width of the cube for a scatter 3D chart.
Returns:
The width of the cube.

setScatterCubeWidth

public void setScatterCubeWidth(int d)
This function sets the width of the cube for a scatter 3D chart.
Parameters:
d - The width to use while drawing the scatter cube.

isWallFrameVisible

public boolean isWallFrameVisible()
Returns whether or not a wireframe is drawn around the 3 walls of a 3D chart.
Returns:
True if a wireframe is drawn, false otherwise.

setWallFrameVisible

public void setWallFrameVisible(boolean b)
Enables/Disables a wireframe around the 3 walls for a 3D chart.

Associated QbChart property: DRAW_WALLFRAME

Parameters:
b - Set to true if wireframe around walls is needed. False otherwise.

getWallColor

public java.awt.Color getWallColor()
This function returns the color used to draw the xy,yz,xz walls for a 3D chart.
Returns:
The color used to draw the walls.

setWallColor

public void setWallColor(java.awt.Color c)
This function sets the color used to draw the xy,yz, and xz walls in a 3D chart.

Associated QbChart property: WALL_COLOR

Parameters:
c - The color object to use.

getColorSpectrum

public ColorSpectrum getColorSpectrum()
This function returns the color spectrum being used. Currently only 3D surface chart supports this feature.
Returns:
The color spectrum
See Also:
setColorSpectrum(quadbase.util.ColorSpectrum)

setColorSpectrum

public void setColorSpectrum(ColorSpectrum colorSpectrum)
This function sets the data color based on the vertical value Currently only 3D surface chart supports this feature.
Parameters:
colorSpectrum - The color spectrum
See Also:
getColorSpectrum()

is3DApproximationUsed

public boolean is3DApproximationUsed()
This function returns whether a 3D rendering approximation method is currently used. Whenever the out of memory error happens, programmers may consider using set3DApproximationUsed(true) as the option of the hidden surface algorithm. The rendering time is much shorter.

However, since it is just an approximation, a correct order of faces is not guaranteed, and thus users should make this decision carefully. This option is particularly useful for 3D scatter charts and surface charts with a lot of data points.
This option is only available for 3D scatter, surface charts and chart with secondary data.
The default value is true.

Returns:
The state of approximation
See Also:
set3DApproximationUsed(boolean)

set3DApproximationUsed

public void set3DApproximationUsed(boolean state)
This function sets the state of 3D rendering approximation. Whenever the out of memory error happens, programmers may consider using set3DApproximationUsed(true) as the option of the hidden surface algorithm. The rendering time is much shorter.

However, since it is just an approximation, a correct order of faces is not guaranteed, and thus users should make this decision carefully. This option is particularly useful for 3D scatter charts and surface charts with a lot of data points.
This option is only available for 3D scatter, surface charts and chart with secondary data.
The default value is true. Same as set3DApproximationUsed(state, 100)

Parameters:
state - The state of approximation
See Also:
is3DApproximationUsed()

useDefault3DDisplayView

public void useDefault3DDisplayView()
Use default 3D Display View angle and scale

set3DApproximationUsed

public void set3DApproximationUsed(boolean state,
                                   int threshold)
This function sets the state of 3D rendering approximation. Whenever the out of memory error happens, programmers may consider using set3DApproximationUsed(true) as the option of the hidden surface algorithm. The rendering time is much shorter.

However, since it is just an approximation, a correct order of faces is not guaranteed, and thus users should make this decision carefully. The default value is false. This option is particularly useful for 3D scatter charts and surface charts with a lot of data points.
The approximation method is triggered when the number of data points is greater than the threshold value.
This option is only available for 3D scatter and surface charts.
The default value of state is true.
The default value of threshold is 100.

Parameters:
state - The state of approximation
threshold - The number of data points (threshold) which triggers the approximation method
See Also:
is3DApproximationUsed()

getApproximationThreshold

public int getApproximationThreshold()
This method returns the threshold value of 3D rendering approximation. The default value is 100. This option is only available for 3D scatter and surface charts
Returns:
The threshold value (number of data points)
See Also:
set3DApproximationUsed(boolean)

isDrawSeriesOnCategoryAxis

public boolean isDrawSeriesOnCategoryAxis()
Determines whether or not drawing series on category axis in 3 dimension space.
Returns:
state The state of drawing method

setDrawSeriesOnCategoryAxis

public void setDrawSeriesOnCategoryAxis(boolean b)
Set drawing series on category axis in 3 dimension space. It only applies to 3D column, bar, stack column, stack bar, and 100% column charts.
Parameters:
state - The state of drawing method

EspressChart
v 5.5