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

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 DirectionalLightObject

java.lang.Object
  extended by com.appearance3Dchooser.DirectionalLightObject

 class DirectionalLightObject
extends java.lang.Object

Class representing a Directional light in the 3D Scene. Parameters for controlling this Directional light are set in a separate control light Panel.


Field Summary
private  javax.swing.JRadioButton directionalLightButton
           
private  javax.swing.JSpinner directionalLightsColorBSpinner
           
private  javax.swing.JSpinner directionalLightsColorGSpinner
           
private  javax.swing.JSpinner directionalLightsColorRSpinner
           
private  javax.swing.JSpinner directionalLightsDirectionXSpinner
           
private  javax.swing.JSpinner directionalLightsDirectionYSpinner
           
private  javax.swing.JSpinner directionalLightsDirectionZSpinner
           
private  javax.media.j3d.BranchGroup light
           
private  javax.media.j3d.TransformGroup sceneTransform
           
private static long serialVersionUID
           
 
Constructor Summary
DirectionalLightObject(javax.swing.JRadioButton directionalLightButton, javax.swing.JSpinner directionalLightsColorRSpinner, javax.swing.JSpinner directionalLightsColorGSpinner, javax.swing.JSpinner directionalLightsColorBSpinner, javax.swing.JSpinner directionalLightsDirectionXSpinner, javax.swing.JSpinner directionalLightsDirectionYSpinner, javax.swing.JSpinner directionalLightsDirectionZSpinner, javax.media.j3d.TransformGroup sceneTransform)
          Constructor for having a Directional light in the 3D Scene.
 
Method Summary
 javax.swing.JRadioButton getButton()
          Get the JRadioButton to set or unset this light.
 javax.swing.JSpinner getColorBSpinner()
          Get the spinner to control the B Value of the light.
 javax.swing.JSpinner getColorGSpinner()
          Get the spinner to control the G Value of the light.
 javax.swing.JSpinner getColorRSpinner()
          Get the spinner to control the R Value of the light.
 javax.swing.JSpinner getDirectionXSpinner()
          Get the spinner to control the X Direction of the light.
 javax.swing.JSpinner getDirectionYSpinner()
          Get the spinner to control the Y Direction of the light.
 javax.swing.JSpinner getDirectionZSpinner()
          Get the spinner to control the Z Direction of the light.
 void set(boolean on)
          Set or unset the light.
 void updateColor()
          Update the light color according to the associated Spinners values.
 void updateDirection()
          Update the light direction according to the associated Spinners values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

directionalLightButton

private javax.swing.JRadioButton directionalLightButton

directionalLightsColorRSpinner

private javax.swing.JSpinner directionalLightsColorRSpinner

directionalLightsColorGSpinner

private javax.swing.JSpinner directionalLightsColorGSpinner

directionalLightsColorBSpinner

private javax.swing.JSpinner directionalLightsColorBSpinner

directionalLightsDirectionXSpinner

private javax.swing.JSpinner directionalLightsDirectionXSpinner

directionalLightsDirectionYSpinner

private javax.swing.JSpinner directionalLightsDirectionYSpinner

directionalLightsDirectionZSpinner

private javax.swing.JSpinner directionalLightsDirectionZSpinner

light

private javax.media.j3d.BranchGroup light

sceneTransform

private javax.media.j3d.TransformGroup sceneTransform
Constructor Detail

DirectionalLightObject

public DirectionalLightObject(javax.swing.JRadioButton directionalLightButton,
                              javax.swing.JSpinner directionalLightsColorRSpinner,
                              javax.swing.JSpinner directionalLightsColorGSpinner,
                              javax.swing.JSpinner directionalLightsColorBSpinner,
                              javax.swing.JSpinner directionalLightsDirectionXSpinner,
                              javax.swing.JSpinner directionalLightsDirectionYSpinner,
                              javax.swing.JSpinner directionalLightsDirectionZSpinner,
                              javax.media.j3d.TransformGroup sceneTransform)
Constructor for having a Directional light in the 3D Scene.

Parameters:
directionalLightButton - the JRadioButton to set or unset this light.
directionalLightsColorRSpinner - a spinner to control the R Value of the light.
directionalLightsColorGSpinner - a spinner to control the G Value of the light.
directionalLightsColorBSpinner - a spinner to control the B Value of the light.
directionalLightsDirectionXSpinner - a spinner to control the light direction according the X axis.
directionalLightsDirectionYSpinner - a spinner to control the light direction according the Y axis.
directionalLightsDirectionZSpinner - a spinner to control the light direction according the Z axis.
sceneTransform - the transformation for the lights.
Method Detail

getButton

public javax.swing.JRadioButton getButton()
Get the JRadioButton to set or unset this light.


getColorRSpinner

public javax.swing.JSpinner getColorRSpinner()
Get the spinner to control the R Value of the light.


getColorGSpinner

public javax.swing.JSpinner getColorGSpinner()
Get the spinner to control the G Value of the light.


getColorBSpinner

public javax.swing.JSpinner getColorBSpinner()
Get the spinner to control the B Value of the light.


getDirectionXSpinner

public javax.swing.JSpinner getDirectionXSpinner()
Get the spinner to control the X Direction of the light.


getDirectionYSpinner

public javax.swing.JSpinner getDirectionYSpinner()
Get the spinner to control the Y Direction of the light.


getDirectionZSpinner

public javax.swing.JSpinner getDirectionZSpinner()
Get the spinner to control the Z Direction of the light.


set

public void set(boolean on)
Set or unset the light.


updateColor

public void updateColor()
Update the light color according to the associated Spinners values. Called when an event is detected on the corresponding Spinner.


updateDirection

public void updateDirection()
Update the light direction according to the associated Spinners values. Called when an event is detected on the corresponding Spinner.



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

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.

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