##################################################################

Appearance3DChooser v1.1

Copyright (C) 2009 Frederic Roudaut


This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

###################################################################

com.appearance3Dchooser
Class RenderingViewPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.appearance3Dchooser.RenderingViewPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

public class RenderingViewPanel
extends javax.swing.JPanel
implements java.awt.event.ActionListener, javax.swing.event.ChangeListener

Panel creation for having a Rendering View.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.JRadioButton addAmbientLightButton
           
protected  javax.swing.JRadioButton addDirectionalLightButton
           
protected  javax.swing.JPanel addingLightPanel
           
protected  javax.swing.JRadioButton addPointLightButton
           
protected  javax.swing.JRadioButton addSpotLightButton
           
protected  java.util.Vector ambientLightsVector
           
protected  javax.swing.JRadioButton antialiasingButton
           
private  javax.media.j3d.Appearance appearanceObjects
           
protected  javax.swing.JRadioButton axisButton
           
protected  javax.media.j3d.Switch axisFrontend
           
protected  javax.media.j3d.Background background
           
protected  javax.swing.JSpinner backgroundColorBSpinner
           
protected  javax.swing.JSpinner backgroundColorGSpinner
           
protected  javax.swing.JSpinner backgroundColorRSpinner
           
protected  SceneView bigVue
           
protected  javax.swing.JRadioButton bigVueButton
           
protected  javax.swing.JFrame bigVueFrame
           
protected  javax.swing.JRadioButton boxButton
           
protected  javax.swing.JRadioButton coneButton
           
protected  javax.swing.JRadioButton cylinderButton
           
protected  java.net.URL DefaultTexture
           
protected  java.util.Vector directionalLightsVector
           
static int LIGHTPANEL_X
           
static int LIGHTPANEL_Y
           
protected  java.awt.GridBagConstraints lightsConstraint
           
protected  javax.swing.JPanel lightsPanel
           
protected  javax.swing.JScrollPane lightsPanelScrollPane
           
protected  int NbLignsLights
           
protected  javax.media.j3d.Switch objectsSwitch
           
protected  java.util.Vector pointLightsVector
           
protected  javax.media.j3d.BranchGroup scene
           
protected  javax.swing.JPanel scenePanel
           
protected  javax.media.j3d.TransformGroup sceneTransform
           
private static long serialVersionUID
           
protected  javax.swing.JRadioButton sphereButton
           
static float SPINNER_ANGLE_INIT
           
static float SPINNER_ANGLE_MAX
           
static float SPINNER_ANGLE_MIN
           
static float SPINNER_ANGLE_STEP
           
static int SPINNER_BACKGROUNDCOLOR_B_INIT
           
static int SPINNER_BACKGROUNDCOLOR_G_INIT
           
static int SPINNER_BACKGROUNDCOLOR_R_INIT
           
static int SPINNER_COLOR_INIT
           
static int SPINNER_COLOR_MAX
           
static int SPINNER_COLOR_MIN
           
static int SPINNER_COLOR_STEP
           
static float SPINNER_CONCENTRATION_INIT
           
static float SPINNER_CONCENTRATION_MAX
           
static float SPINNER_CONCENTRATION_MIN
           
static float SPINNER_CONCENTRATION_STEP
           
static float SPINNER_COORDINATE_INIT
           
static float SPINNER_COORDINATE_MAX
           
static float SPINNER_COORDINATE_MIN
           
static float SPINNER_COORDINATE_STEP
           
protected  java.util.Vector spotLightsVector
           
protected  javax.media.j3d.Texture texture
           
protected  javax.media.j3d.TextureAttributes textureAttributes
           
protected  javax.media.j3d.Transform3D textureTransform
           
protected  SceneView vueFront
           
protected  SceneView vueLeft
           
protected  SceneView vueRight
           
protected  SceneView vueTop
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RenderingViewPanel(java.net.URL DefaultTextureName)
          Constructor for creating a rendering view panel
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          run when the user chooses another object in the scene or wants a 3D Axis, Antialiasing or a Big View.
private  void CreateAmbientLightControl()
          Panel creation for controlling an Ambient light in the scene.
protected  void createAxis()
          3D Axis Creation for the scene.
protected  void createBackground()
          Background creation for the scene objects.
private  void CreateDirectionalLightControl()
          Panel creation for controlling a Directional light in the scene.
private  void CreatePointLightControl()
          Panel creation for controlling a Point light in the scene.
 javax.media.j3d.BranchGroup createSceneGraph(javax.media.j3d.Canvas3D top, javax.media.j3d.Canvas3D right, javax.media.j3d.Canvas3D left, javax.media.j3d.Canvas3D front, javax.media.j3d.Canvas3D big)
          3D Scene Creation.
private  void CreateSpotLightControl()
          Panel creation for controlling a Spot light in the scene.
protected  void createTexture()
          Texture creation for the scene objects
 void initLights()
          Set some default lights.
static void main(java.lang.String[] args)
          Main method for a Test purpose.
protected  javax.swing.JPanel makeAddingLightsPanel()
          Panel creation for adding new lights.
protected  javax.swing.JScrollPane makeLightsPanel()
          Panel creation for controlling lights in the scene.
protected  javax.swing.JPanel makeObjectChooserPanel()
          Panel creation for choosing the object in the Scene : Cube, Cylinder, Sphere, Cone.
protected  javax.swing.JPanel makeScenePanel()
          Panel for the 3D scene.
 void repaint()
          redraw all the rendering panels
protected  void setBackgroundColor(javax.vecmath.Color3f c)
          Set the Background color.
 void setObject(int i)
          Show a defined object.
 void setObjectsAmbientColor(javax.vecmath.Color3f c)
          Set the Ambient Color for the Scene objects.
 void setObjectsDiffuseColor(javax.vecmath.Color3f c)
          Set the Diffuse Color for the Scene objects.
 void setObjectsEmissiveColor(javax.vecmath.Color3f c)
          Set the Emissive Color for the Scene objects.
 void setObjectsLighting(boolean b)
          Set or Uset the lighting for the Scene objects.
 void setObjectsShininess(float s)
          Set the Shininess for the Scene objects.
 void setObjectsSpecularColor(javax.vecmath.Color3f c)
          Set the Specular Color for the Scene objects.
 void setObjectsTextureBlendColor(float r, float g, float b, float a)
          Set the Texture Blend Color to use on the Scene objects.
 void setObjectsTextureCombineAlphaFunction(int[] f)
          Set the Texture COMBINE Function for the Alpha Components to use on the Scene objects.
 void setObjectsTextureCombineAlphaMode(int m)
          Set the Texture COMBINE Mode for the Alpha Components of the output color to use on the Scene objects.
 void setObjectsTextureCombineAlphaScale(int m)
          Set the Texture COMBINE Scale for the Alpha Components of the output color to use on the Scene objects.
 void setObjectsTextureCombineAlphaSource(int[] s)
          Set the Texture COMBINE Source for the Alpha Components to use on the Scene objects.
 void setObjectsTextureCombineRGBFunction(int[] f)
          Set the Texture COMBINE Function for the RGB Components to use on the Scene objects.
 void setObjectsTextureCombineRGBMode(int m)
          Set the Texture COMBINE Mode for the RGB Components of the output color to use on the Scene objects.
 void setObjectsTextureCombineRGBScale(int m)
          Set the Texture COMBINE Scale for the RGB Components of the output color to use on the Scene objects.
 void setObjectsTextureCombineRGBSource(int[] s)
          Set the Texture COMBINE Source for the RGB Components to use on the Scene objects.
 void setObjectsTextureMode(int m)
          Set the Texture Mode to use on the Scene objects.
 void setObjectsTexturePerspectiveCorrectionMode(int m)
          Set the Texture Perspective Correction Mode to use on the Scene objects.
 void setObjectsTransparency(float s)
          Set the Transparency value for the Scene objects.
 void setObjectsTransparencyDstBlendFunction(int f)
          Set the Transparency Dst Blend Function for the Scene objects.
 void setObjectsTransparencyMode(int m)
          Set the Transparency mode for the Scene objects.
 void setObjectsTransparencySrcBlendFunction(int f)
          Set the Transparency Src Blend Function for the Scene objects.
 void setSceneAntialiasing(boolean on)
          Set Antialiasing on the scene.
 void setTexture(java.net.URL urlTexture)
          Set the Texture on the Scene objects.
 void setTextureTransform(javax.media.j3d.Transform3D t)
          Set the Texture transform to use on the Scene objects.
 void showAxis()
          Hide or Show the 3D Axis in the Scene.
 void stateChanged(javax.swing.event.ChangeEvent e)
          run when the user modifies a light parameter on a running light.
 void unsetTexture()
          Unset the Texture use on the Scene objects.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

SPINNER_COORDINATE_MIN

public static final float SPINNER_COORDINATE_MIN
See Also:
Constant Field Values

SPINNER_COORDINATE_MAX

public static final float SPINNER_COORDINATE_MAX
See Also:
Constant Field Values

SPINNER_COORDINATE_INIT

public static final float SPINNER_COORDINATE_INIT
See Also:
Constant Field Values

SPINNER_COORDINATE_STEP

public static final float SPINNER_COORDINATE_STEP
See Also:
Constant Field Values

SPINNER_ANGLE_MIN

public static final float SPINNER_ANGLE_MIN
See Also:
Constant Field Values

SPINNER_ANGLE_MAX

public static final float SPINNER_ANGLE_MAX
See Also:
Constant Field Values

SPINNER_ANGLE_INIT

public static final float SPINNER_ANGLE_INIT
See Also:
Constant Field Values

SPINNER_ANGLE_STEP

public static final float SPINNER_ANGLE_STEP
See Also:
Constant Field Values

SPINNER_CONCENTRATION_MIN

public static final float SPINNER_CONCENTRATION_MIN
See Also:
Constant Field Values

SPINNER_CONCENTRATION_MAX

public static final float SPINNER_CONCENTRATION_MAX
See Also:
Constant Field Values

SPINNER_CONCENTRATION_INIT

public static final float SPINNER_CONCENTRATION_INIT
See Also:
Constant Field Values

SPINNER_CONCENTRATION_STEP

public static final float SPINNER_CONCENTRATION_STEP
See Also:
Constant Field Values

SPINNER_COLOR_MIN

public static final int SPINNER_COLOR_MIN
See Also:
Constant Field Values

SPINNER_COLOR_MAX

public static final int SPINNER_COLOR_MAX
See Also:
Constant Field Values

SPINNER_COLOR_INIT

public static final int SPINNER_COLOR_INIT
See Also:
Constant Field Values

SPINNER_COLOR_STEP

public static final int SPINNER_COLOR_STEP
See Also:
Constant Field Values

SPINNER_BACKGROUNDCOLOR_R_INIT

public static final int SPINNER_BACKGROUNDCOLOR_R_INIT
See Also:
Constant Field Values

SPINNER_BACKGROUNDCOLOR_G_INIT

public static final int SPINNER_BACKGROUNDCOLOR_G_INIT
See Also:
Constant Field Values

SPINNER_BACKGROUNDCOLOR_B_INIT

public static final int SPINNER_BACKGROUNDCOLOR_B_INIT
See Also:
Constant Field Values

objectsSwitch

protected javax.media.j3d.Switch objectsSwitch

axisFrontend

protected javax.media.j3d.Switch axisFrontend

scene

protected javax.media.j3d.BranchGroup scene

sceneTransform

protected javax.media.j3d.TransformGroup sceneTransform

vueTop

protected SceneView vueTop

vueFront

protected SceneView vueFront

vueLeft

protected SceneView vueLeft

vueRight

protected SceneView vueRight

bigVue

protected SceneView bigVue

antialiasingButton

protected javax.swing.JRadioButton antialiasingButton

axisButton

protected javax.swing.JRadioButton axisButton

backgroundColorRSpinner

protected javax.swing.JSpinner backgroundColorRSpinner

backgroundColorGSpinner

protected javax.swing.JSpinner backgroundColorGSpinner

backgroundColorBSpinner

protected javax.swing.JSpinner backgroundColorBSpinner

bigVueButton

protected javax.swing.JRadioButton bigVueButton

boxButton

protected javax.swing.JRadioButton boxButton

sphereButton

protected javax.swing.JRadioButton sphereButton

cylinderButton

protected javax.swing.JRadioButton cylinderButton

coneButton

protected javax.swing.JRadioButton coneButton

addAmbientLightButton

protected javax.swing.JRadioButton addAmbientLightButton

addDirectionalLightButton

protected javax.swing.JRadioButton addDirectionalLightButton

addSpotLightButton

protected javax.swing.JRadioButton addSpotLightButton

addPointLightButton

protected javax.swing.JRadioButton addPointLightButton

scenePanel

protected javax.swing.JPanel scenePanel

addingLightPanel

protected javax.swing.JPanel addingLightPanel

lightsPanel

protected javax.swing.JPanel lightsPanel

lightsPanelScrollPane

protected javax.swing.JScrollPane lightsPanelScrollPane

bigVueFrame

protected javax.swing.JFrame bigVueFrame

LIGHTPANEL_X

public static final int LIGHTPANEL_X
See Also:
Constant Field Values

LIGHTPANEL_Y

public static final int LIGHTPANEL_Y
See Also:
Constant Field Values

NbLignsLights

protected int NbLignsLights

lightsConstraint

protected java.awt.GridBagConstraints lightsConstraint

texture

protected javax.media.j3d.Texture texture

DefaultTexture

protected java.net.URL DefaultTexture

textureAttributes

protected javax.media.j3d.TextureAttributes textureAttributes

textureTransform

protected javax.media.j3d.Transform3D textureTransform

background

protected javax.media.j3d.Background background

ambientLightsVector

protected java.util.Vector ambientLightsVector

directionalLightsVector

protected java.util.Vector directionalLightsVector

pointLightsVector

protected java.util.Vector pointLightsVector

spotLightsVector

protected java.util.Vector spotLightsVector

appearanceObjects

private javax.media.j3d.Appearance appearanceObjects
Constructor Detail

RenderingViewPanel

public RenderingViewPanel(java.net.URL DefaultTextureName)
Constructor for creating a rendering view panel

Parameters:
DefaultTextureName - Default Texture File.
Method Detail

makeAddingLightsPanel

protected javax.swing.JPanel makeAddingLightsPanel()
Panel creation for adding new lights.


makeLightsPanel

protected javax.swing.JScrollPane makeLightsPanel()
Panel creation for controlling lights in the scene.


CreateAmbientLightControl

private void CreateAmbientLightControl()
Panel creation for controlling an Ambient light in the scene.


CreateDirectionalLightControl

private void CreateDirectionalLightControl()
Panel creation for controlling a Directional light in the scene.


CreatePointLightControl

private void CreatePointLightControl()
Panel creation for controlling a Point light in the scene.


CreateSpotLightControl

private void CreateSpotLightControl()
Panel creation for controlling a Spot light in the scene.


makeScenePanel

protected javax.swing.JPanel makeScenePanel()
Panel for the 3D scene.


makeObjectChooserPanel

protected javax.swing.JPanel makeObjectChooserPanel()
Panel creation for choosing the object in the Scene : Cube, Cylinder, Sphere, Cone.


repaint

public void repaint()
redraw all the rendering panels

Overrides:
repaint in class java.awt.Component

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
run when the user modifies a light parameter on a running light. It permits to update the scene based on the user choice.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
e - the associated event

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
run when the user chooses another object in the scene or wants a 3D Axis, Antialiasing or a Big View.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the associated event

createSceneGraph

public javax.media.j3d.BranchGroup createSceneGraph(javax.media.j3d.Canvas3D top,
                                                    javax.media.j3d.Canvas3D right,
                                                    javax.media.j3d.Canvas3D left,
                                                    javax.media.j3d.Canvas3D front,
                                                    javax.media.j3d.Canvas3D big)
3D Scene Creation.

Parameters:
top - Top canvas.
right - Right canvas.
left - Left canvas.
front - Front canvas.
big - Big canvas.
Returns:
3D Scene.

createBackground

protected void createBackground()
Background creation for the scene objects.


setBackgroundColor

protected void setBackgroundColor(javax.vecmath.Color3f c)
Set the Background color.

Parameters:
c - the Color to set.

createTexture

protected void createTexture()
Texture creation for the scene objects


setObject

public void setObject(int i)
Show a defined object. Ie Sphere, Cone, Cylinder or Cube

Parameters:
i - object number to draw

createAxis

protected void createAxis()
3D Axis Creation for the scene. Each axis is 1.0 in length.


showAxis

public void showAxis()
Hide or Show the 3D Axis in the Scene.


initLights

public void initLights()
Set some default lights.


setSceneAntialiasing

public void setSceneAntialiasing(boolean on)
Set Antialiasing on the scene.

Parameters:
on - true if requested, false otherwise.

setObjectsAmbientColor

public void setObjectsAmbientColor(javax.vecmath.Color3f c)
Set the Ambient Color for the Scene objects.

Parameters:
c - the Ambient Color to set.

setObjectsDiffuseColor

public void setObjectsDiffuseColor(javax.vecmath.Color3f c)
Set the Diffuse Color for the Scene objects.

Parameters:
c - the Diffuse Color to set.

setObjectsSpecularColor

public void setObjectsSpecularColor(javax.vecmath.Color3f c)
Set the Specular Color for the Scene objects.

Parameters:
c - the Specular Color to set.

setObjectsEmissiveColor

public void setObjectsEmissiveColor(javax.vecmath.Color3f c)
Set the Emissive Color for the Scene objects.

Parameters:
c - the Emissive Color to set.

setObjectsLighting

public void setObjectsLighting(boolean b)
Set or Uset the lighting for the Scene objects.

Parameters:
b - true if lighting is set, false otherwise.

setObjectsShininess

public void setObjectsShininess(float s)
Set the Shininess for the Scene objects.

Parameters:
s - the Shininess.

setObjectsTransparency

public void setObjectsTransparency(float s)
Set the Transparency value for the Scene objects.

Parameters:
s - the Transparency value.

setObjectsTransparencyMode

public void setObjectsTransparencyMode(int m)
Set the Transparency mode for the Scene objects.

Parameters:
m - the Transparency Mode.

setObjectsTransparencySrcBlendFunction

public void setObjectsTransparencySrcBlendFunction(int f)
Set the Transparency Src Blend Function for the Scene objects.

Parameters:
f - the Transparency Src Blend Function.

setObjectsTransparencyDstBlendFunction

public void setObjectsTransparencyDstBlendFunction(int f)
Set the Transparency Dst Blend Function for the Scene objects.

Parameters:
f - the Transparency Dst Blend Function.

setTexture

public void setTexture(java.net.URL urlTexture)
Set the Texture on the Scene objects.

Parameters:
urlTexture - the Texture URL.

unsetTexture

public void unsetTexture()
Unset the Texture use on the Scene objects.


setTextureTransform

public void setTextureTransform(javax.media.j3d.Transform3D t)
Set the Texture transform to use on the Scene objects.

Parameters:
t - the Texture transform.

setObjectsTexturePerspectiveCorrectionMode

public void setObjectsTexturePerspectiveCorrectionMode(int m)
Set the Texture Perspective Correction Mode to use on the Scene objects.

Parameters:
m - the Texture Perspective Correction Mode.

setObjectsTextureMode

public void setObjectsTextureMode(int m)
Set the Texture Mode to use on the Scene objects.

Parameters:
m - the Texture Mode.

setObjectsTextureCombineRGBMode

public void setObjectsTextureCombineRGBMode(int m)
Set the Texture COMBINE Mode for the RGB Components of the output color to use on the Scene objects.

Parameters:
m - the Texture COMBINE Mode.

setObjectsTextureCombineRGBSource

public void setObjectsTextureCombineRGBSource(int[] s)
Set the Texture COMBINE Source for the RGB Components to use on the Scene objects.

Parameters:
s - the Texture COMBINE Source.

setObjectsTextureCombineRGBFunction

public void setObjectsTextureCombineRGBFunction(int[] f)
Set the Texture COMBINE Function for the RGB Components to use on the Scene objects.

Parameters:
f - the Texture COMBINE Function.

setObjectsTextureCombineRGBScale

public void setObjectsTextureCombineRGBScale(int m)
Set the Texture COMBINE Scale for the RGB Components of the output color to use on the Scene objects.

Parameters:
m - the Texture COMBINE Scale.

setObjectsTextureCombineAlphaMode

public void setObjectsTextureCombineAlphaMode(int m)
Set the Texture COMBINE Mode for the Alpha Components of the output color to use on the Scene objects.

Parameters:
m - the Texture COMBINE Mode.

setObjectsTextureCombineAlphaSource

public void setObjectsTextureCombineAlphaSource(int[] s)
Set the Texture COMBINE Source for the Alpha Components to use on the Scene objects.

Parameters:
s - the Texture COMBINE Source.

setObjectsTextureCombineAlphaFunction

public void setObjectsTextureCombineAlphaFunction(int[] f)
Set the Texture COMBINE Function for the Alpha Components to use on the Scene objects.

Parameters:
f - the Texture COMBINE Function.

setObjectsTextureCombineAlphaScale

public void setObjectsTextureCombineAlphaScale(int m)
Set the Texture COMBINE Scale for the Alpha Components of the output color to use on the Scene objects.

Parameters:
m - the Texture COMBINE Scale.

setObjectsTextureBlendColor

public void setObjectsTextureBlendColor(float r,
                                        float g,
                                        float b,
                                        float a)
Set the Texture Blend Color to use on the Scene objects.

Parameters:
r - the R value of the Texture Blend Color.
g - the G value of the Texture Blend Color.
b - the B value of the Texture Blend Color.
a - the Alpha value of the Texture Blend Color.

main

public static void main(java.lang.String[] args)
Main method for a Test purpose.

Parameters:
args - arguments used for the call.


##################################################################

Appearance3DChooser v1.1

Copyright (C) 2009 Frederic Roudaut


This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

###################################################################