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

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 Appearance3DChooserPanel

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.Appearance3DChooserPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener

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

Appearance3DChooserPanel Class.
A basic class with a Panel for updating your objects appearances. It takes into account following attributes :


An instance of this object fire a Property Event when a dedicated parameter is modified. It distinguishes the following events :

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
static java.lang.String AMBIENT
           
protected  float[] ambientColor
           
protected  javax.swing.JPanel ambientColorPanel
           
protected  com.colorpicker.swing.ColorPicker ambientColorPicker
           
protected  javax.swing.JCheckBox checkBoxLighting
           
protected  int colorTarget
           
static java.lang.String COLORTARGET
           
static int COLORTARGET_AMBIENT
           
static int COLORTARGET_AMBIENT_AND_DIFFUSE
           
static int COLORTARGET_DIFFUSE
           
static int COLORTARGET_EMISSIVE
           
static int COLORTARGET_SPECULAR
           
protected  java.net.URL DefaultTextureName
           
static java.lang.String DIFFUSE
           
protected  float[] diffuseColor
           
protected  javax.swing.JPanel diffuseColorPanel
           
protected  com.colorpicker.swing.ColorPicker diffuseColorPicker
           
static java.lang.String EMISSIVE
           
protected  float[] emissiveColor
           
protected  javax.swing.JPanel emissiveColorPanel
           
protected  com.colorpicker.swing.ColorPicker emissiveColorPicker
           
protected  boolean isTextureSet
           
protected  boolean lighting
           
static java.lang.String LIGHTING
           
protected  javax.swing.JComboBox listColorTarget
           
protected  javax.swing.JComboBox listTransparencyDstBlendFunction
           
protected  javax.swing.JComboBox listTransparencyMode
           
protected  javax.swing.JComboBox listTransparencySrcBlendFunction
           
protected  javax.swing.JTabbedPane mainTabbedPane
           
protected  javax.swing.JTabbedPane MaterialTabPane
           
protected  javax.swing.JPanel miscellaneousPanel
           
protected  RenderingViewPanel renderingViewPanel
           
private static long serialVersionUID
           
protected  float shininess
           
static java.lang.String SHININESS
           
protected  boolean showMaterial
           
protected  boolean showRendering
           
protected  boolean showTexture
           
protected  boolean showTransparency
           
protected  javax.swing.JSlider sliderShininess
           
protected  javax.swing.JSlider sliderTransparency
           
static java.lang.String SPECULAR
           
protected  float[] specularColor
           
protected  javax.swing.JPanel specularColorPanel
           
protected  com.colorpicker.swing.ColorPicker specularColorPicker
           
protected  javax.swing.JSpinner spinnerShininess
           
protected  javax.swing.JSpinner spinnerTransparency
           
static java.lang.String TEXTURE_BLEND
           
static java.lang.String TEXTURE_COMBINE_ALPHA_FUNCTION
           
static java.lang.String TEXTURE_COMBINE_ALPHA_MODE
           
static java.lang.String TEXTURE_COMBINE_ALPHA_SCALE
           
static java.lang.String TEXTURE_COMBINE_ALPHA_SOURCE
           
static java.lang.String TEXTURE_COMBINE_RGB_FUNCTION
           
static java.lang.String TEXTURE_COMBINE_RGB_MODE
           
static java.lang.String TEXTURE_COMBINE_RGB_SCALE
           
static java.lang.String TEXTURE_COMBINE_RGB_SOURCE
           
static java.lang.String TEXTURE_FILE
           
static java.lang.String TEXTURE_MODE
           
static java.lang.String TEXTURE_PERSPECTIVE_CORRECTION_MODE
           
static java.lang.String TEXTURE_TRANSFORM
           
static java.lang.String TEXTURE_USE
           
protected  float[] textureBlendColor
           
protected  int[] textureCombineAlphaFunction
           
protected  int textureCombineAlphaMode
           
protected  int textureCombineAlphaScale
           
protected  int[] textureCombineAlphaSource
           
protected  int[] textureCombineRGBFunction
           
protected  int textureCombineRGBMode
           
protected  int textureCombineRGBScale
           
protected  int[] textureCombineRGBSource
           
protected  int textureMode
           
protected  java.net.URL textureName
           
protected  TexturePane texturePane
           
protected  int texturePerspectiveCorrectionMode
           
protected  javax.media.j3d.Transform3D textureTransform
           
protected  float transparency
           
static java.lang.String TRANSPARENCY
           
static java.lang.String TRANSPARENCY_DST_BLEND_FUNCTION
           
static int TRANSPARENCY_DST_BLEND_ONE
           
static int TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_ALPHA
           
static int TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_COLOR
           
static int TRANSPARENCY_DST_BLEND_SRC_ALPHA
           
static int TRANSPARENCY_DST_BLEND_SRC_COLOR
           
static int TRANSPARENCY_DST_BLEND_ZERO
           
static java.lang.String TRANSPARENCY_MODE
           
static int TRANSPARENCY_MODE_BLENDED
           
static int TRANSPARENCY_MODE_FASTEST
           
static int TRANSPARENCY_MODE_NICEST
           
static int TRANSPARENCY_MODE_NONE
           
static int TRANSPARENCY_MODE_SCREEN_DOOR
           
static int TRANSPARENCY_SRC_BLEND_DST_COLOR
           
static java.lang.String TRANSPARENCY_SRC_BLEND_FUNCTION
           
static int TRANSPARENCY_SRC_BLEND_ONE
           
static int TRANSPARENCY_SRC_BLEND_ONE_MINUS_DST_COLOR
           
static int TRANSPARENCY_SRC_BLEND_ONE_MINUS_SRC_ALPHA
           
static int TRANSPARENCY_SRC_BLEND_SRC_ALPHA
           
static int TRANSPARENCY_SRC_BLEND_ZERO
           
protected  int transparencyDstBlendFunction
           
protected  int transparencyMode
           
protected  javax.swing.JPanel transparencyPanel
           
protected  int transparencySrcBlendFunction
           
 
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
Appearance3DChooserPanel(boolean showMaterial, boolean showTransparency, boolean showTexture, boolean showRendering)
          Main Appearance3DChooserPanel constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Called when an action is performed on the Transparency Pane mainly.
static int convertExternTransparencyDstBlendFunction(int f)
          Convert a Transparency Destination Blend Function from Internal representation to TransparencyAttributes representation.
static int convertExternTransparencyMode(int m)
          Convert a Transparency Mode from Internal representation to TransparencyAttributes representation.
static int convertExternTransparencySrcBlendFunction(int f)
          Convert a Transparency Source Blend Function from Internal representation to TransparencyAttributes representation.
static int convertInternTransparencyDstBlendFunction(int f)
          Convert a Transparency Destination Blend Function from TransparencyAttributes representation to Internal representation.
static int convertInternTransparencyMode(int m)
          Convert a Transparency Mode from TransparencyAttributes representation to Internal representation.
static int convertInternTransparencySrcBlendFunction(int f)
          Convert a Transparency Source Blend Function from TransparencyAttributes representation to Internal representation.
 float[] getAmbientColor()
          Return the Ambient Color.
 int getColorTarget()
          Return the Color Target.
 float[] getDiffuseColor()
          Return the Diffuse Color.
 float[] getEmissiveColor()
          Return the Emissive Color.
 boolean getLighting()
          Return the Lighting mode.
 float getShininess()
          Return the Shininess.
 float[] getSpecularColor()
          Return the Specular Color.
 float[] getTextureBlendColor()
          Return the Texture Blend Color.
 int[] getTextureCombineAlphaFunction()
          Return the Texture Combine Alpha Function.
 int getTextureCombineAlphaMode()
          Return the Texture Combine Alpha Mode.
 int getTextureCombineAlphaScale()
          Return the Texture Combine Alpha Scale.
 int[] getTextureCombineAlphaSource()
          Return the Texture Combine Alpha Source.
 int[] getTextureCombineRGBFunction()
          Return the Texture Combine RGB Function.
 int getTextureCombineRGBMode()
          Return the Texture Combine RGB Mode.
 int getTextureCombineRGBScale()
          Return the Texture Combine RGB Scale.
 int[] getTextureCombineRGBSource()
          Return the Texture Combine RGB Source.
 java.net.URL getTextureFile()
          Return the Texture File URL.
 int getTextureMode()
          Return the Texture Mode.
 int getTexturePerspectiveCorrectionMode()
          Return the Texture Perspective Correction Mode.
 javax.media.j3d.Transform3D getTextureTransform()
          Return the Texture Transform.
 float getTextureTransformRotZ()
          Return the Texture Transform Rotation on Z axis.
 float getTextureTransformScaleX()
          Return the Texture Transform Scale on X axis.
 float getTextureTransformScaleY()
          Return the Texture Transform Scale on Y axis.
 float getTextureTransformTranslatX()
          Return the Texture Transform Translation on X axis.
 float getTextureTransformTranslatY()
          Return the Texture Transform Translation on Y axis.
 float getTransparency()
          Return the transparency value.
 int getTransparencyDstBlendFunction()
          Return the transparency Destination Blend Function.
 int getTransparencyMode()
          Return the transparency Mode.
 int getTransparencySrcBlendFunction()
          Return the transparency Source Blend Function.
 boolean isTextureSet()
          Return the Texture Setting.
 void itemStateChanged(java.awt.event.ItemEvent e)
          Called when the Lighting checkbox in the Material Pane is clicked.
static void main(java.lang.String[] args)
          A Main Exemple.
private  void makeMaterialPane()
          Create a Material Pane.
private  void makeRenderPane()
          Create a Rendering Pane.
private  void makeTexturePane()
          Create a Texture Pane.
private  void makeTransparencyPane()
          Create a Transparency Pane.
 void setAmbientColor(float[] c)
          Set the Ambient Color
 void setColorTarget(int c)
          Set the Color Target.
 void setDefaultTextureFile(java.net.URL t)
          Set the Default Texture File URL.
 void setDiffuseColor(float[] c)
          Set the Diffuse Color
 void setEmissiveColor(float[] c)
          Set the Emissive Color.
 void setLighting(boolean l)
          Set the Lighting mode.
 void setShininess(float s)
          Set the Shininess.
 void setSpecularColor(float[] c)
          Set the Specular Color.
 void setTextureBlendColor(float[] c)
          Set the Texture Blend Color.
 void setTextureCombineAlphaFunction(int[] m)
          Set the Texture Combine Alpha Function.
 void setTextureCombineAlphaMode(int m)
          Set the Texture Combine Alpha Mode.
 void setTextureCombineAlphaScale(int s)
          Set the Texture Combine Alpha Scale.
 void setTextureCombineAlphaSource(int[] m)
          Set the Texture Combine Alpha Source.
 void setTextureCombineRGBFunction(int[] m)
          Set the Texture Combine RGB Function.
 void setTextureCombineRGBMode(int m)
          Set the Texture Combine RGB Mode.
 void setTextureCombineRGBScale(int s)
          Set the Texture Combine RGB Scale.
 void setTextureCombineRGBSource(int[] m)
          Set the Texture Combine RGB Source
 void setTextureFile(java.net.URL t)
          Set the Texture File URL.
 void setTextureMode(int m)
          Set the Texture Mode.
 void setTexturePerspectiveCorrectionMode(int m)
          Set the Texture Perspective Correction Mode.
 void setTextureTransform(javax.media.j3d.Transform3D t)
          Set the Texture Transform.
 void setTextureTransformRotZ(float v)
          Set the Texture Transform Rotation on Z axis.
 void setTextureTransformScaleX(float v)
          Set the Texture Transform Scale on X axis.
 void setTextureTransformScaleY(float v)
          Set the Texture Transform Scale on Y axis.
 void setTextureTransformTranslatX(float v)
          Set the Texture Transform Translation on X axis.
 void setTextureTransformTranslatY(float v)
          Set the Texture Transform Translation on Y axis.
 void setTextureUse(boolean b)
          Set the Texture Setting.
 void setTransparency(float o)
          Set the transparency value.
 void setTransparencyDstBlendFunction(int m)
          Set the transparency Destination Blend Function.
 void setTransparencyMode(int m)
          Set the transparency Mode.
 void setTransparencySrcBlendFunction(int m)
          Set the transparency Source Blend Function.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Called when a state changes on the Transparency and the Material Pane mainly (ie a slider is used ...).
private  void updateAmbientColor(float[] c)
          Internal update of the Ambient Color Parameters and fire of an associated property.
private  void updateColorTarget(int c)
          Internal update of the Color Target Parameters and fire of an associated property.
private  void updateDiffuseColor(float[] c)
          Internal update of the Diffuse Color Parameters and fire of an associated property.
private  void updateEmissiveColor(float[] c)
          Internal update of the Emissive Color Parameters and fire of an associated property.
private  void updateIsTextureSet(boolean on)
          Internal update of the Texture Setting Parameters and fire of an associated property.
private  void updateLighting(boolean l)
          Internal update of the Lighting mode Parameters and fire of an associated property.
private  void updateShininess(float s)
          Internal update of the Shininess Parameters and fire of an associated property.
private  void updateSpecularColor(float[] c)
           
private  void updateTexture(java.net.URL t)
          Internal update of the Texture File URL Parameters and fire of an associated property.
private  void updateTextureBlendColor(float[] c)
          Internal update of the Texture Blend Color Parameters and fire of an associated property.
private  void updateTextureCombineAlphaFunction(int[] m)
          Internal update of the Texture Combine Alpha Function Parameters and fire of an associated property.
private  void updateTextureCombineAlphaMode(int m)
          Internal update of the Texture Combine Alpha Mode Parameters and fire of an associated property.
private  void updateTextureCombineAlphaScale(int m)
          Internal update of the Texture Combine Alpha Scale Parameters and fire of an associated property.
private  void updateTextureCombineAlphaSource(int[] m)
          Internal update of the Texture Combine Alpha Source Parameters and fire of an associated property.
private  void updateTextureCombineRGBFunction(int[] m)
          Internal update of the Texture Combine RGB Function Parameters and fire of an associated property.
private  void updateTextureCombineRGBMode(int m)
          Internal update of the Texture Combine RGB Mode Parameters and fire of an associated property.
private  void updateTextureCombineRGBScale(int m)
          Internal update of the Texture Combine RGB Scale Parameters and fire of an associated property.
private  void updateTextureCombineRGBSource(int[] m)
          Internal update of the Texture Combine RGB Source Parameters and fire of an associated property.
protected  void updateTextureMode(int m)
          Internal update of the Texture Mode Parameters and fire of an associated property.
protected  void updateTexturePerspectiveCorrectionMode(int m)
           
private  void updateTextureTransform(javax.media.j3d.Transform3D t)
          Internal update of the Texture Transform Parameters and fire of an associated property.
private  void updateTransparency(float o)
          Internal update of the transparency value Parameters and fire of an associated property.
private  void updateTransparencyDstBlendFunction(int f)
          Internal update of the transparency Destination Blend Function Parameters and fire of an associated property.
private  void updateTransparencyMode(int m)
          Internal update of the transparency Mode Parameters and fire of an associated property.
private  void updateTransparencySrcBlendFunction(int f)
          Internal update of the transparency Source Blend Function Parameters and fire of an associated property.
 
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, 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

SPECULAR

public static final java.lang.String SPECULAR
See Also:
Constant Field Values

AMBIENT

public static final java.lang.String AMBIENT
See Also:
Constant Field Values

EMISSIVE

public static final java.lang.String EMISSIVE
See Also:
Constant Field Values

DIFFUSE

public static final java.lang.String DIFFUSE
See Also:
Constant Field Values

COLORTARGET

public static final java.lang.String COLORTARGET
See Also:
Constant Field Values

SHININESS

public static final java.lang.String SHININESS
See Also:
Constant Field Values

LIGHTING

public static final java.lang.String LIGHTING
See Also:
Constant Field Values

TRANSPARENCY

public static final java.lang.String TRANSPARENCY
See Also:
Constant Field Values

TRANSPARENCY_MODE

public static final java.lang.String TRANSPARENCY_MODE
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_FUNCTION

public static final java.lang.String TRANSPARENCY_SRC_BLEND_FUNCTION
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_FUNCTION

public static final java.lang.String TRANSPARENCY_DST_BLEND_FUNCTION
See Also:
Constant Field Values

TEXTURE_FILE

public static final java.lang.String TEXTURE_FILE
See Also:
Constant Field Values

TEXTURE_USE

public static final java.lang.String TEXTURE_USE
See Also:
Constant Field Values

TEXTURE_TRANSFORM

public static final java.lang.String TEXTURE_TRANSFORM
See Also:
Constant Field Values

TEXTURE_PERSPECTIVE_CORRECTION_MODE

public static final java.lang.String TEXTURE_PERSPECTIVE_CORRECTION_MODE
See Also:
Constant Field Values

TEXTURE_MODE

public static final java.lang.String TEXTURE_MODE
See Also:
Constant Field Values

TEXTURE_BLEND

public static final java.lang.String TEXTURE_BLEND
See Also:
Constant Field Values

TEXTURE_COMBINE_RGB_MODE

public static final java.lang.String TEXTURE_COMBINE_RGB_MODE
See Also:
Constant Field Values

TEXTURE_COMBINE_RGB_SOURCE

public static final java.lang.String TEXTURE_COMBINE_RGB_SOURCE
See Also:
Constant Field Values

TEXTURE_COMBINE_RGB_FUNCTION

public static final java.lang.String TEXTURE_COMBINE_RGB_FUNCTION
See Also:
Constant Field Values

TEXTURE_COMBINE_RGB_SCALE

public static final java.lang.String TEXTURE_COMBINE_RGB_SCALE
See Also:
Constant Field Values

TEXTURE_COMBINE_ALPHA_MODE

public static final java.lang.String TEXTURE_COMBINE_ALPHA_MODE
See Also:
Constant Field Values

TEXTURE_COMBINE_ALPHA_SOURCE

public static final java.lang.String TEXTURE_COMBINE_ALPHA_SOURCE
See Also:
Constant Field Values

TEXTURE_COMBINE_ALPHA_FUNCTION

public static final java.lang.String TEXTURE_COMBINE_ALPHA_FUNCTION
See Also:
Constant Field Values

TEXTURE_COMBINE_ALPHA_SCALE

public static final java.lang.String TEXTURE_COMBINE_ALPHA_SCALE
See Also:
Constant Field Values

COLORTARGET_AMBIENT

public static final int COLORTARGET_AMBIENT
See Also:
Constant Field Values

COLORTARGET_EMISSIVE

public static final int COLORTARGET_EMISSIVE
See Also:
Constant Field Values

COLORTARGET_DIFFUSE

public static final int COLORTARGET_DIFFUSE
See Also:
Constant Field Values

COLORTARGET_SPECULAR

public static final int COLORTARGET_SPECULAR
See Also:
Constant Field Values

COLORTARGET_AMBIENT_AND_DIFFUSE

public static final int COLORTARGET_AMBIENT_AND_DIFFUSE
See Also:
Constant Field Values

TRANSPARENCY_MODE_FASTEST

public static final int TRANSPARENCY_MODE_FASTEST
See Also:
Constant Field Values

TRANSPARENCY_MODE_NICEST

public static final int TRANSPARENCY_MODE_NICEST
See Also:
Constant Field Values

TRANSPARENCY_MODE_BLENDED

public static final int TRANSPARENCY_MODE_BLENDED
See Also:
Constant Field Values

TRANSPARENCY_MODE_SCREEN_DOOR

public static final int TRANSPARENCY_MODE_SCREEN_DOOR
See Also:
Constant Field Values

TRANSPARENCY_MODE_NONE

public static final int TRANSPARENCY_MODE_NONE
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_ZERO

public static final int TRANSPARENCY_SRC_BLEND_ZERO
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_ONE

public static final int TRANSPARENCY_SRC_BLEND_ONE
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_SRC_ALPHA

public static final int TRANSPARENCY_SRC_BLEND_SRC_ALPHA
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_ONE_MINUS_SRC_ALPHA

public static final int TRANSPARENCY_SRC_BLEND_ONE_MINUS_SRC_ALPHA
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_DST_COLOR

public static final int TRANSPARENCY_SRC_BLEND_DST_COLOR
See Also:
Constant Field Values

TRANSPARENCY_SRC_BLEND_ONE_MINUS_DST_COLOR

public static final int TRANSPARENCY_SRC_BLEND_ONE_MINUS_DST_COLOR
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_ZERO

public static final int TRANSPARENCY_DST_BLEND_ZERO
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_ONE

public static final int TRANSPARENCY_DST_BLEND_ONE
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_SRC_ALPHA

public static final int TRANSPARENCY_DST_BLEND_SRC_ALPHA
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_ALPHA

public static final int TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_ALPHA
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_SRC_COLOR

public static final int TRANSPARENCY_DST_BLEND_SRC_COLOR
See Also:
Constant Field Values

TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_COLOR

public static final int TRANSPARENCY_DST_BLEND_ONE_MINUS_SRC_COLOR
See Also:
Constant Field Values

ambientColor

protected float[] ambientColor

diffuseColor

protected float[] diffuseColor

specularColor

protected float[] specularColor

emissiveColor

protected float[] emissiveColor

shininess

protected float shininess

colorTarget

protected int colorTarget

lighting

protected boolean lighting

transparencyMode

protected int transparencyMode

transparencySrcBlendFunction

protected int transparencySrcBlendFunction

transparencyDstBlendFunction

protected int transparencyDstBlendFunction

transparency

protected float transparency

DefaultTextureName

protected java.net.URL DefaultTextureName

textureName

protected java.net.URL textureName

isTextureSet

protected boolean isTextureSet

textureTransform

protected javax.media.j3d.Transform3D textureTransform

texturePerspectiveCorrectionMode

protected int texturePerspectiveCorrectionMode

textureMode

protected int textureMode

textureBlendColor

protected float[] textureBlendColor

textureCombineRGBSource

protected int[] textureCombineRGBSource

textureCombineRGBFunction

protected int[] textureCombineRGBFunction

textureCombineRGBMode

protected int textureCombineRGBMode

textureCombineRGBScale

protected int textureCombineRGBScale

textureCombineAlphaMode

protected int textureCombineAlphaMode

textureCombineAlphaSource

protected int[] textureCombineAlphaSource

textureCombineAlphaFunction

protected int[] textureCombineAlphaFunction

textureCombineAlphaScale

protected int textureCombineAlphaScale

mainTabbedPane

protected javax.swing.JTabbedPane mainTabbedPane

MaterialTabPane

protected javax.swing.JTabbedPane MaterialTabPane

ambientColorPanel

protected javax.swing.JPanel ambientColorPanel

diffuseColorPanel

protected javax.swing.JPanel diffuseColorPanel

specularColorPanel

protected javax.swing.JPanel specularColorPanel

emissiveColorPanel

protected javax.swing.JPanel emissiveColorPanel

miscellaneousPanel

protected javax.swing.JPanel miscellaneousPanel

transparencyPanel

protected javax.swing.JPanel transparencyPanel

texturePane

protected TexturePane texturePane

renderingViewPanel

protected RenderingViewPanel renderingViewPanel

ambientColorPicker

protected com.colorpicker.swing.ColorPicker ambientColorPicker

diffuseColorPicker

protected com.colorpicker.swing.ColorPicker diffuseColorPicker

emissiveColorPicker

protected com.colorpicker.swing.ColorPicker emissiveColorPicker

specularColorPicker

protected com.colorpicker.swing.ColorPicker specularColorPicker

listColorTarget

protected javax.swing.JComboBox listColorTarget

listTransparencyMode

protected javax.swing.JComboBox listTransparencyMode

listTransparencySrcBlendFunction

protected javax.swing.JComboBox listTransparencySrcBlendFunction

listTransparencyDstBlendFunction

protected javax.swing.JComboBox listTransparencyDstBlendFunction

sliderShininess

protected javax.swing.JSlider sliderShininess

spinnerShininess

protected javax.swing.JSpinner spinnerShininess

checkBoxLighting

protected javax.swing.JCheckBox checkBoxLighting

sliderTransparency

protected javax.swing.JSlider sliderTransparency

spinnerTransparency

protected javax.swing.JSpinner spinnerTransparency

showMaterial

protected boolean showMaterial

showTransparency

protected boolean showTransparency

showTexture

protected boolean showTexture

showRendering

protected boolean showRendering
Constructor Detail

Appearance3DChooserPanel

public Appearance3DChooserPanel(boolean showMaterial,
                                boolean showTransparency,
                                boolean showTexture,
                                boolean showRendering)
Main Appearance3DChooserPanel constructor. Generate a Panel with all the Panes associated to control some of the JAVA 3D Appearence attributes.

Parameters:
showMaterial - set it to true if you want to see the Material Panel.
showTransparency - set it to true if you want to see the Transparency Panel.
showTexture - set it to true if you want to see the Texture Panel.
showRendering - set it to true if you want to see the Rendering Panel.
Method Detail

makeRenderPane

private void makeRenderPane()
Create a Rendering Pane.


makeTexturePane

private void makeTexturePane()
Create a Texture Pane.


makeTransparencyPane

private void makeTransparencyPane()
Create a Transparency Pane.


makeMaterialPane

private void makeMaterialPane()
Create a Material Pane.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Called when an action is performed on the Transparency Pane mainly.

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

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Called when a state changes on the Transparency and the Material Pane mainly (ie a slider is used ...).

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

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Called when the Lighting checkbox in the Material Pane is clicked.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
e - the related event.

getTransparency

public float getTransparency()
Return the transparency value.

Returns:
the amount of transparency to be applied to the Appearance component object. The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.

setTransparency

public void setTransparency(float o)
Set the transparency value.

Parameters:
o - the amount of transparency to be applied to the Appearance component object. The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.

updateTransparency

private void updateTransparency(float o)
Internal update of the transparency value Parameters and fire of an associated property.

Parameters:
o - the amount of transparency to be applied to the Appearance component object. The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.

getTransparencyMode

public int getTransparencyMode()
Return the transparency Mode.

Returns:
the transparency Mode between TransparencyAttributes.FASTEST, TransparencyAttributes.NICEST, TransparencyAttributes.SCREEN_DOOR, TransparencyAttributes.BLENDED, TransparencyAttributes.NONE

setTransparencyMode

public void setTransparencyMode(int m)
Set the transparency Mode.

Parameters:
m - the transparency Mode between TransparencyAttributes.FASTEST, TransparencyAttributes.NICEST, TransparencyAttributes.SCREEN_DOOR, TransparencyAttributes.BLENDED, TransparencyAttributes.NONE

updateTransparencyMode

private void updateTransparencyMode(int m)
Internal update of the transparency Mode Parameters and fire of an associated property.

Parameters:
m - the transparency Mode between TransparencyAttributes.FASTEST, TransparencyAttributes.NICEST, TransparencyAttributes.SCREEN_DOOR, TransparencyAttributes.BLENDED, TransparencyAttributes.NONE

getTransparencySrcBlendFunction

public int getTransparencySrcBlendFunction()
Return the transparency Source Blend Function.

Returns:
the transparency Source Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, TransparencyAttributes.BLEND_DST_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_DST_COLOR.

setTransparencySrcBlendFunction

public void setTransparencySrcBlendFunction(int m)
Set the transparency Source Blend Function.

Parameters:
m - the transparency Source Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, TransparencyAttributes.BLEND_DST_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_DST_COLOR.

updateTransparencySrcBlendFunction

private void updateTransparencySrcBlendFunction(int f)
Internal update of the transparency Source Blend Function Parameters and fire of an associated property.

Parameters:
f - the transparency Source Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, TransparencyAttributes.BLEND_DST_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_DST_COLOR.

getTransparencyDstBlendFunction

public int getTransparencyDstBlendFunction()
Return the transparency Destination Blend Function.

Returns:
the transparency Destination Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, TransparencyAttributes.BLEND_SRC_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_SRC_COLOR.

setTransparencyDstBlendFunction

public void setTransparencyDstBlendFunction(int m)
Set the transparency Destination Blend Function.

Parameters:
m - the transparency Destination Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, TransparencyAttributes.BLEND_SRC_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_SRC_COLOR.

updateTransparencyDstBlendFunction

private void updateTransparencyDstBlendFunction(int f)
Internal update of the transparency Destination Blend Function Parameters and fire of an associated property.

Parameters:
f - the transparency Destination Blend Function between TransparencyAttributes.BLEND_ZERO, TransparencyAttributes.BLEND_ONE, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, TransparencyAttributes.BLEND_SRC_COLOR, TransparencyAttributes.BLEND_ONE_MINUS_SRC_COLOR.

getLighting

public boolean getLighting()
Return the Lighting mode.

Returns:
true if lighting is enabled for the object, false otherwise.

setLighting

public void setLighting(boolean l)
Set the Lighting mode.

Parameters:
l - true lighting is enabled for the object, false otherwise.

updateLighting

private void updateLighting(boolean l)
Internal update of the Lighting mode Parameters and fire of an associated property.

Parameters:
l - true lighting is enabled for the object, false otherwise.

getColorTarget

public int getColorTarget()
Return the Color Target.

Returns:
the Color Target. One of: Material.AMBIENT, Material.EMISSIVE, Material.DIFFUSE, Material.SPECULAR, or Material.AMBIENT_AND_DIFFUSE.

setColorTarget

public void setColorTarget(int c)
Set the Color Target.

Parameters:
c - the Color Target. One of: Material.AMBIENT, Material.EMISSIVE, Material.DIFFUSE, Material.SPECULAR, or Material.AMBIENT_AND_DIFFUSE.

updateColorTarget

private void updateColorTarget(int c)
Internal update of the Color Target Parameters and fire of an associated property.

Parameters:
c - the Color Target. One of: Material.AMBIENT, Material.EMISSIVE, Material.DIFFUSE, Material.SPECULAR, or Material.AMBIENT_AND_DIFFUSE.

getShininess

public float getShininess()
Return the Shininess.

Returns:
the Shininess in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny.

setShininess

public void setShininess(float s)
Set the Shininess.

Parameters:
s - the Shininess in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny.

updateShininess

private void updateShininess(float s)
Internal update of the Shininess Parameters and fire of an associated property.

Parameters:
s - the Shininess in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny.

getAmbientColor

public float[] getAmbientColor()
Return the Ambient Color.

Returns:
the Ambient Color in (R,G,B).

setAmbientColor

public void setAmbientColor(float[] c)
Set the Ambient Color

Parameters:
c - the Ambient Color in (R,G,B).

updateAmbientColor

private void updateAmbientColor(float[] c)
Internal update of the Ambient Color Parameters and fire of an associated property.

Parameters:
c - the Ambient Color in (R,G,B).

getDiffuseColor

public float[] getDiffuseColor()
Return the Diffuse Color.

Returns:
the Diffuse Color in (R,G,B).

setDiffuseColor

public void setDiffuseColor(float[] c)
Set the Diffuse Color

Parameters:
c - the Diffuse Color in (R,G,B).

updateDiffuseColor

private void updateDiffuseColor(float[] c)
Internal update of the Diffuse Color Parameters and fire of an associated property.

Parameters:
c - the Diffuse Color in (R,G,B).

getSpecularColor

public float[] getSpecularColor()
Return the Specular Color.

Returns:
the Specular Color in (R,G,B).

setSpecularColor

public void setSpecularColor(float[] c)
Set the Specular Color.

Parameters:
c - the Specular Color in (R,G,B).

updateSpecularColor

private void updateSpecularColor(float[] c)

getEmissiveColor

public float[] getEmissiveColor()
Return the Emissive Color.

Returns:
the Emissive Color in (R,G,B).

setEmissiveColor

public void setEmissiveColor(float[] c)
Set the Emissive Color.

Parameters:
c - the Emissive Color in (R,G,B).

updateEmissiveColor

private void updateEmissiveColor(float[] c)
Internal update of the Emissive Color Parameters and fire of an associated property.

Parameters:
c - the Emissive Color in (R,G,B).

isTextureSet

public boolean isTextureSet()
Return the Texture Setting.

Returns:
true if the texture is used, false otherwise.

setTextureUse

public void setTextureUse(boolean b)
Set the Texture Setting.

Parameters:
b - true if the texture is used, false otherwise.

updateIsTextureSet

private void updateIsTextureSet(boolean on)
Internal update of the Texture Setting Parameters and fire of an associated property.

Parameters:
on - true if the texture is used, false otherwise.

getTextureFile

public java.net.URL getTextureFile()
Return the Texture File URL.

Returns:
the Texture File URL.

setTextureFile

public void setTextureFile(java.net.URL t)
Set the Texture File URL.

Parameters:
t - the Texture File URL.

setDefaultTextureFile

public void setDefaultTextureFile(java.net.URL t)
Set the Default Texture File URL.

Parameters:
t - the Default Texture File URL.

updateTexture

private void updateTexture(java.net.URL t)
Internal update of the Texture File URL Parameters and fire of an associated property.

Parameters:
t - the Texture File URL.

getTextureTransform

public javax.media.j3d.Transform3D getTextureTransform()
Return the Texture Transform.

Returns:
the Texture Transform.

setTextureTransform

public void setTextureTransform(javax.media.j3d.Transform3D t)
Set the Texture Transform.

Parameters:
t - the Texture Transform.

updateTextureTransform

private void updateTextureTransform(javax.media.j3d.Transform3D t)
Internal update of the Texture Transform Parameters and fire of an associated property.

Parameters:
t - the Texture Transform.

getTextureTransformScaleX

public float getTextureTransformScaleX()
Return the Texture Transform Scale on X axis.

Returns:
the Texture Transform Scale on X axis.

setTextureTransformScaleX

public void setTextureTransformScaleX(float v)
Set the Texture Transform Scale on X axis.

Parameters:
v - the Texture Transform Scale on X axis.

getTextureTransformScaleY

public float getTextureTransformScaleY()
Return the Texture Transform Scale on Y axis.

Returns:
the Texture Transform Scale on Y axis.

setTextureTransformScaleY

public void setTextureTransformScaleY(float v)
Set the Texture Transform Scale on Y axis.

Parameters:
v - the Texture Transform Scale on Y axis.

getTextureTransformTranslatX

public float getTextureTransformTranslatX()
Return the Texture Transform Translation on X axis.

Returns:
the Texture Transform Translation on X axis.

setTextureTransformTranslatX

public void setTextureTransformTranslatX(float v)
Set the Texture Transform Translation on X axis.

Parameters:
v - the Texture Transform Translation on X axis.

getTextureTransformTranslatY

public float getTextureTransformTranslatY()
Return the Texture Transform Translation on Y axis.

Returns:
the Texture Transform Translation on Y axis.

setTextureTransformTranslatY

public void setTextureTransformTranslatY(float v)
Set the Texture Transform Translation on Y axis.

Parameters:
v - the Texture Transform Translation on Y axis.

getTextureTransformRotZ

public float getTextureTransformRotZ()
Return the Texture Transform Rotation on Z axis.

Returns:
the Texture Transform Rotation on Z axis.

setTextureTransformRotZ

public void setTextureTransformRotZ(float v)
Set the Texture Transform Rotation on Z axis.

Parameters:
v - the Texture Transform Rotation on Z axis.

getTexturePerspectiveCorrectionMode

public int getTexturePerspectiveCorrectionMode()
Return the Texture Perspective Correction Mode.

Returns:
the Texture Perspective Correction Mode between TextureAttributes.NICEST, TextureAttributes.FASTEST.

setTexturePerspectiveCorrectionMode

public void setTexturePerspectiveCorrectionMode(int m)
Set the Texture Perspective Correction Mode.

Parameters:
m - the Texture Perspective Correction Mode between TextureAttributes.NICEST, TextureAttributes.FASTEST.

updateTexturePerspectiveCorrectionMode

protected void updateTexturePerspectiveCorrectionMode(int m)

getTextureMode

public int getTextureMode()
Return the Texture Mode.

Returns:
the Texture Mode between TextureAttributes.MODULATE, TextureAttributes.DECAL, TextureAttributes.BLEND, TextureAttributes.REPLACE, TextureAttributes.COMBINE.

setTextureMode

public void setTextureMode(int m)
Set the Texture Mode.

Parameters:
m - the Texture Mode between TextureAttributes.MODULATE, TextureAttributes.DECAL, TextureAttributes.BLEND, TextureAttributes.REPLACE, TextureAttributes.COMBINE.

updateTextureMode

protected void updateTextureMode(int m)
Internal update of the Texture Mode Parameters and fire of an associated property.

Parameters:
m - the Texture Mode between TextureAttributes.MODULATE, TextureAttributes.DECAL, TextureAttributes.BLEND, TextureAttributes.REPLACE, TextureAttributes.COMBINE.

getTextureBlendColor

public float[] getTextureBlendColor()
Return the Texture Blend Color.

Returns:
the Texture Blend Color in (R,G,B,A).

setTextureBlendColor

public void setTextureBlendColor(float[] c)
Set the Texture Blend Color.

Parameters:
c - the Texture Blend Color in (R,G,B,A).

updateTextureBlendColor

private void updateTextureBlendColor(float[] c)
Internal update of the Texture Blend Color Parameters and fire of an associated property.

Parameters:
c - the Texture Blend Color in (R,G,B,A).

getTextureCombineRGBMode

public int getTextureCombineRGBMode()
Return the Texture Combine RGB Mode.

Returns:
the Texture Combine RGB Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE, TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT, TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3

setTextureCombineRGBMode

public void setTextureCombineRGBMode(int m)
Set the Texture Combine RGB Mode.

Parameters:
m - the Texture Combine RGB Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE, TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT, TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.

updateTextureCombineRGBMode

private void updateTextureCombineRGBMode(int m)
Internal update of the Texture Combine RGB Mode Parameters and fire of an associated property.

Parameters:
m - the Texture Combine RGB Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE, TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT, TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.

getTextureCombineRGBSource

public int[] getTextureCombineRGBSource()
Return the Texture Combine RGB Source.

Returns:
the Texture Combine RGB Source between TextureAttributes.COMBINE_OBJECT_COLOR, TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR, TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.

setTextureCombineRGBSource

public void setTextureCombineRGBSource(int[] m)
Set the Texture Combine RGB Source

Parameters:
m - the Texture Combine RGB Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR, TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR, TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE

updateTextureCombineRGBSource

private void updateTextureCombineRGBSource(int[] m)
Internal update of the Texture Combine RGB Source Parameters and fire of an associated property.

Parameters:
m - the Texture Combine RGB Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR, TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR, TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.

getTextureCombineRGBFunction

public int[] getTextureCombineRGBFunction()
Return the Texture Combine RGB Function.

Returns:
the Texture Combine RGB Function between TextureAttributes.COMBINE_SRC_COLOR, TextureAttributes.COMBINE_ONE_MINUS_SRC_COLOR, TextureAttributes.COMBINE_SRC_ALPHA, TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.

setTextureCombineRGBFunction

public void setTextureCombineRGBFunction(int[] m)
Set the Texture Combine RGB Function.

Parameters:
m - the Texture Combine RGB Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_COLOR, TextureAttributes.COMBINE_ONE_MINUS_SRC_COLOR, TextureAttributes.COMBINE_SRC_ALPHA, TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.

updateTextureCombineRGBFunction

private void updateTextureCombineRGBFunction(int[] m)
Internal update of the Texture Combine RGB Function Parameters and fire of an associated property.

Parameters:
m - the Texture Combine RGB Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_COLOR, TextureAttributes.COMBINE_ONE_MINUS_SRC_COLOR, TextureAttributes.COMBINE_SRC_ALPHA, TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.

getTextureCombineRGBScale

public int getTextureCombineRGBScale()
Return the Texture Combine RGB Scale.

Returns:
the Texture Combine RGB Scale.

setTextureCombineRGBScale

public void setTextureCombineRGBScale(int s)
Set the Texture Combine RGB Scale.

Parameters:
s - the Texture Combine RGB Scale.

updateTextureCombineRGBScale

private void updateTextureCombineRGBScale(int m)
Internal update of the Texture Combine RGB Scale Parameters and fire of an associated property.

Parameters:
m - the Texture Combine RGB Scale.

getTextureCombineAlphaMode

public int getTextureCombineAlphaMode()
Return the Texture Combine Alpha Mode.

Returns:
the Texture Combine Alpha Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE, TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT, TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.

setTextureCombineAlphaMode

public void setTextureCombineAlphaMode(int m)
Set the Texture Combine Alpha Mode.

Parameters:
m - the Texture Combine Alpha Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE, TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT, TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.

updateTextureCombineAlphaMode

private void updateTextureCombineAlphaMode(int m)
Internal update of the Texture Combine Alpha Mode Parameters and fire of an associated property.

Parameters:
m - the Texture Combine Alpha Mode between TextureAttributes.COMBINE_REPLACE, TextureAttributes.COMBINE_MODULATE, TextureAttributes.COMBINE_ADD, TextureAttributes.COMBINE_ADD_SIGNED, TextureAttributes.COMBINE_SUBTRACT, TextureAttributes.COMBINE_INTERPOLATE, TextureAttributes.COMBINE_DOT3.

getTextureCombineAlphaSource

public int[] getTextureCombineAlphaSource()
Return the Texture Combine Alpha Source.

Returns:
the Texture Combine Alpha Source between TextureAttributes.COMBINE_OBJECT_COLOR, TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR, TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.

setTextureCombineAlphaSource

public void setTextureCombineAlphaSource(int[] m)
Set the Texture Combine Alpha Source.

Parameters:
m - the Texture Combine Alpha Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR, TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR, TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.

updateTextureCombineAlphaSource

private void updateTextureCombineAlphaSource(int[] m)
Internal update of the Texture Combine Alpha Source Parameters and fire of an associated property.

Parameters:
m - the Texture Combine Alpha Source (C0,C1,C2) between TextureAttributes.COMBINE_OBJECT_COLOR, TextureAttributes.COMBINE_TEXTURE_COLOR, TextureAttributes.COMBINE_CONSTANT_COLOR, TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STATE.

getTextureCombineAlphaFunction

public int[] getTextureCombineAlphaFunction()
Return the Texture Combine Alpha Function.

Returns:
the Texture Combine Alpha Function between TextureAttributes.COMBINE_SRC_ALPHA, TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.

setTextureCombineAlphaFunction

public void setTextureCombineAlphaFunction(int[] m)
Set the Texture Combine Alpha Function.

Parameters:
m - the Texture Combine Alpha Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_ALPHA, TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.

updateTextureCombineAlphaFunction

private void updateTextureCombineAlphaFunction(int[] m)
Internal update of the Texture Combine Alpha Function Parameters and fire of an associated property.

Parameters:
m - the Texture Combine Alpha Function (C0,C1,C2) between TextureAttributes.COMBINE_SRC_ALPHA, TextureAttributes.COMBINE_ONE_MINUS_SRC_ALPHA.

getTextureCombineAlphaScale

public int getTextureCombineAlphaScale()
Return the Texture Combine Alpha Scale.

Returns:
the Texture Combine Alpha Scale.

setTextureCombineAlphaScale

public void setTextureCombineAlphaScale(int s)
Set the Texture Combine Alpha Scale.

Parameters:
s - the Texture Combine Alpha Scale.

updateTextureCombineAlphaScale

private void updateTextureCombineAlphaScale(int m)
Internal update of the Texture Combine Alpha Scale Parameters and fire of an associated property.

Parameters:
m - the Texture Combine Alpha Scale.

convertInternTransparencyMode

public static int convertInternTransparencyMode(int m)
Convert a Transparency Mode from TransparencyAttributes representation to Internal representation.

Parameters:
m - a Transparency Mode in TransparencyAttributes representation.
Returns:
a Transparency Mode in Internal representation.

convertExternTransparencyMode

public static int convertExternTransparencyMode(int m)
Convert a Transparency Mode from Internal representation to TransparencyAttributes representation.

Parameters:
m - a Transparency Mode in Internal representation.
Returns:
a Transparency Mode in TransparencyAttributes representation.

convertExternTransparencySrcBlendFunction

public static int convertExternTransparencySrcBlendFunction(int f)
Convert a Transparency Source Blend Function from Internal representation to TransparencyAttributes representation.

Parameters:
f - a Transparency Source Blend Function in Internal representation.
Returns:
a Transparency Source Blend Function in TransparencyAttributes representation.

convertInternTransparencySrcBlendFunction

public static int convertInternTransparencySrcBlendFunction(int f)
Convert a Transparency Source Blend Function from TransparencyAttributes representation to Internal representation.

Parameters:
f - a Transparency Source Blend Function in TransparencyAttributes representation.
Returns:
a Transparency Source Blend Function in Internal representation.

convertExternTransparencyDstBlendFunction

public static int convertExternTransparencyDstBlendFunction(int f)
Convert a Transparency Destination Blend Function from Internal representation to TransparencyAttributes representation.

Parameters:
f - a Transparency Destination Blend Function in Internal representation.
Returns:
a Transparency Destination Blend Function in TransparencyAttributes representation.

convertInternTransparencyDstBlendFunction

public static int convertInternTransparencyDstBlendFunction(int f)
Convert a Transparency Destination Blend Function from TransparencyAttributes representation to Internal representation.

Parameters:
f - a Transparency Destination Blend Function in TransparencyAttributes representation.
Returns:
a Transparency Destination Blend Function in Internal representation.

main

public static void main(java.lang.String[] args)
A Main Exemple.



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

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.

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