JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d.j3d
Class JC3DUniverse

java.lang.Object
  |
  +--com.klg.jclass.chart3d.j3d.JC3DUniverse

public class JC3DUniverse
extends Object

This class provides low-level methods to build the Java 3D scene graph. An instance of this class is created in JCChart3dUniverse.


Field Summary
protected  com.klg.jclass.chart3d.j3d.JCTransformGroup tgViewPlatform
           
 
Constructor Summary
JC3DUniverse()
          Creates the Java3D scene graph with view platform.
 
Method Summary
 void addAmbientLight()
          Adds an AmbientLight to the scene graph.
 void addBackground()
          Adds a Background with default characteristics to the scene graph.
 void addBehavior(Behavior behavior)
          Adds a specified Behavior to the scene graph.
 void addContent(com.klg.jclass.chart3d.j3d.JCBranchGroup bg)
          Adds a BranchGroup containing the 3D chart to the scene graph.
 void addDirectionalLight()
          Adds a DirectionalLight with default characteristics to the scene graph.
 void addFog(Fog fog)
          Adds a Fog object to the scene graph.
 void addLighting(Light light)
          Adds a Light object to the scene graph.
 void addLinearFog(Color3f fogColor)
          Adds a LinearFog object to the scene graph.
 void addPointLight()
          Adds a PointLight with default characteristics to the scene graph.
 void addSpotLight()
          Adds a SpotLight with default characteristics to the scene graph.
 void adjustFogDistance(double z)
          Changes the front and back distances of the fog by the specified value.
 com.klg.jclass.chart3d.j3d.JCBranchGroup createSceneGraph(Canvas3D canvas)
          Creates the Java3D scene graph.
 void enableFog(boolean flag)
          Displays or hides the fog.
 Background getBackgroundNode()
          Returns the Background object.
 BoundingSphere getBoundingSphere()
          Returns the BoundingSphere associated with Fog, Light, and Background objects in the virtual universe.
protected  com.klg.jclass.chart3d.j3d.JCCanvas3D getCanvas3D()
           
 com.klg.jclass.chart3d.j3d.JCBranchGroup getContent()
          Returns the BranchGroup containing the 3D chart.
protected  Point3d getEyeCoordinate()
           
 Fog getFog()
          Returns the last Fog object that was added.
 double getFogBackDistance()
          Returns the back distance of the fog.
 void getFogColor(Color3f color3f)
          Returns the color of the fog.
 double getFogFrontDistance()
          Returns the front distance of the fog.
 ArrayList getLighting()
          Returns an ArrayList containing references to all of the Light objects in the scene graph.
 Locale getLocale()
          Returns the Locale object for the virtual universe.
 com.klg.jclass.chart3d.j3d.JCBranchGroup getSceneBranchGroup()
          Returns the BranchGroup containing the scene graph.
 double getViewPlatformDistance()
           
protected  com.klg.jclass.chart3d.j3d.JCTransformGroup getViewPlatformTransformGroup()
           
 boolean isFogEnabled()
          Returns the display state of the fog.
 void removeAllContent()
          Removes the BranchGroup containing the 3D chart from the scene graph.
 void removeBackground()
          Removes the Background object from the scene graph.
 void removeFog()
          Removes any Fog object from the scene graph.
 void removeLighting()
          Removes all Light objects from the scene graph.
 void setFogBackDistance(double back)
          Sets the back distance of the fog.
 void setFogColor(Color3f color3f)
          Sets the color of the fog.
 void setFogFrontDistance(double front)
          Sets the front distance of the fog.
 void setSceneAntialiasing(boolean flag)
          Enables or disables full scene antialiasing.
 void setViewPlatformDistance(double vpDistance)
           
 void setViewPlatformRotation(double angleX, double angleY, double angleZ)
          Adjust the orientation of the view platform so that the plotcube appears to be rotated in the specified x,y, and z angles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tgViewPlatform

protected com.klg.jclass.chart3d.j3d.JCTransformGroup tgViewPlatform
Constructor Detail

JC3DUniverse

public JC3DUniverse()
Creates the Java3D scene graph with view platform.

Method Detail

createSceneGraph

public com.klg.jclass.chart3d.j3d.JCBranchGroup createSceneGraph(Canvas3D canvas)
Creates the Java3D scene graph.

Parameters:
canvas - the Canvas3D in which the chart is rendered
Returns:
a JCBranchGroup containing the scene graph

getCanvas3D

protected com.klg.jclass.chart3d.j3d.JCCanvas3D getCanvas3D()

getBoundingSphere

public BoundingSphere getBoundingSphere()
Returns the BoundingSphere associated with Fog, Light, and Background objects in the virtual universe.

Returns:
the BoundingSphere object

getViewPlatformTransformGroup

protected com.klg.jclass.chart3d.j3d.JCTransformGroup getViewPlatformTransformGroup()

getSceneBranchGroup

public com.klg.jclass.chart3d.j3d.JCBranchGroup getSceneBranchGroup()
Returns the BranchGroup containing the scene graph.

Returns:
the BranchGroup containing the scene graph

setViewPlatformDistance

public void setViewPlatformDistance(double vpDistance)

getViewPlatformDistance

public double getViewPlatformDistance()

getEyeCoordinate

protected Point3d getEyeCoordinate()

addFog

public void addFog(Fog fog)
Adds a Fog object to the scene graph.

Parameters:
fog - the Fog object to be added

addLinearFog

public void addLinearFog(Color3f fogColor)
Adds a LinearFog object to the scene graph. Any existing Fog object is replaced.

Parameters:
fogColor - the color of the fog to be added

removeFog

public void removeFog()
Removes any Fog object from the scene graph.


getFog

public Fog getFog()
Returns the last Fog object that was added.

Returns:
the last Fog object added to the scene graph

enableFog

public void enableFog(boolean flag)
Displays or hides the fog.

Parameters:
flag - true to show the fog, false to hide the fog

isFogEnabled

public boolean isFogEnabled()
Returns the display state of the fog.

Returns:
a boolean; true if the fog is visible, false if the fog is hidden

setFogColor

public void setFogColor(Color3f color3f)
Sets the color of the fog.

Parameters:
color3f - the desired color of the fog

getFogColor

public void getFogColor(Color3f color3f)
Returns the color of the fog.

Parameters:
color3f - the color of the fog

getFogFrontDistance

public double getFogFrontDistance()
Returns the front distance of the fog.

Returns:
the front distance of the fog (in meters)

getFogBackDistance

public double getFogBackDistance()
Returns the back distance of the fog.

Returns:
the back distance of the fog (in meters)

setFogFrontDistance

public void setFogFrontDistance(double front)
Sets the front distance of the fog.

Parameters:
front - the front distance of the fog (in meters)

setFogBackDistance

public void setFogBackDistance(double back)
Sets the back distance of the fog.

Parameters:
back - the back distance of the fog (in meters)

adjustFogDistance

public void adjustFogDistance(double z)
Changes the front and back distances of the fog by the specified value.

Parameters:
z - the value (in meters) by which the front and back distances are to be changed

addBehavior

public void addBehavior(Behavior behavior)
Adds a specified Behavior to the scene graph.

Parameters:
behavior - the Behavior object to be added

addContent

public void addContent(com.klg.jclass.chart3d.j3d.JCBranchGroup bg)
Adds a BranchGroup containing the 3D chart to the scene graph.

Parameters:
bg - the BranchGroup to be added

removeAllContent

public void removeAllContent()
Removes the BranchGroup containing the 3D chart from the scene graph.


getContent

public com.klg.jclass.chart3d.j3d.JCBranchGroup getContent()
Returns the BranchGroup containing the 3D chart.

Returns:
the BranchGroup containing the 3D chart

addLighting

public void addLighting(Light light)
Adds a Light object to the scene graph.

Parameters:
light - the Light object to be added

removeLighting

public void removeLighting()
Removes all Light objects from the scene graph.


getLighting

public ArrayList getLighting()
Returns an ArrayList containing references to all of the Light objects in the scene graph.

Returns:
an ArrayList containing references to all Light objects

addAmbientLight

public void addAmbientLight()
Adds an AmbientLight to the scene graph.


addSpotLight

public void addSpotLight()
Adds a SpotLight with default characteristics to the scene graph.


addDirectionalLight

public void addDirectionalLight()
Adds a DirectionalLight with default characteristics to the scene graph.


addPointLight

public void addPointLight()
Adds a PointLight with default characteristics to the scene graph.


addBackground

public void addBackground()
Adds a Background with default characteristics to the scene graph.


removeBackground

public void removeBackground()
Removes the Background object from the scene graph.


getBackgroundNode

public Background getBackgroundNode()
Returns the Background object.

Returns:
the Background object

setSceneAntialiasing

public void setSceneAntialiasing(boolean flag)
Enables or disables full scene antialiasing.

Parameters:
flag - true to enable full scene antialiasing, false to disable

getLocale

public Locale getLocale()
Returns the Locale object for the virtual universe.

Returns:
the Locale object

setViewPlatformRotation

public void setViewPlatformRotation(double angleX,
                                    double angleY,
                                    double angleZ)
Adjust the orientation of the view platform so that the plotcube appears to be rotated in the specified x,y, and z angles.

Parameters:
angleX - rotation about the x axis in degrees
angleY - rotation about the y axis in degrees
angleZ - rotation about the z axis in degrees

Copyright © 2004 Quest Software Inc..
All rights reserved.