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

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 SpotLightObject

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

 class SpotLightObject
extends java.lang.Object

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


Field Summary
private  javax.media.j3d.BranchGroup light
           
private  javax.media.j3d.TransformGroup sceneTransform
           
private static long serialVersionUID
           
private  javax.swing.JRadioButton spotLightButton
           
private  javax.swing.JSpinner spotLightsAttenuationXSpinner
           
private  javax.swing.JSpinner spotLightsAttenuationYSpinner
           
private  javax.swing.JSpinner spotLightsAttenuationZSpinner
           
private  javax.swing.JSpinner spotLightsColorBSpinner
           
private  javax.swing.JSpinner spotLightsColorGSpinner
           
private  javax.swing.JSpinner spotLightsColorRSpinner
           
private  javax.swing.JSpinner spotLightsConcentrationSpinner
           
private  javax.swing.JSpinner spotLightsDirectionXSpinner
           
private  javax.swing.JSpinner spotLightsDirectionYSpinner
           
private  javax.swing.JSpinner spotLightsDirectionZSpinner
           
private  javax.swing.JSpinner spotLightsPositionXSpinner
           
private  javax.swing.JSpinner spotLightsPositionYSpinner
           
private  javax.swing.JSpinner spotLightsPositionZSpinner
           
private  javax.swing.JSpinner spotLightsSpreadAngleSpinner
           
 
Constructor Summary
SpotLightObject(javax.swing.JRadioButton spotLightButton, javax.swing.JSpinner spotLightsColorRSpinner, javax.swing.JSpinner spotLightsColorGSpinner, javax.swing.JSpinner spotLightsColorBSpinner, javax.swing.JSpinner spotLightsPositionXSpinner, javax.swing.JSpinner spotLightsPositionYSpinner, javax.swing.JSpinner spotLightsPositionZSpinner, javax.swing.JSpinner spotLightsAttenuationXSpinner, javax.swing.JSpinner spotLightsAttenuationYSpinner, javax.swing.JSpinner spotLightsAttenuationZSpinner, javax.swing.JSpinner spotLightsDirectionXSpinner, javax.swing.JSpinner spotLightsDirectionYSpinner, javax.swing.JSpinner spotLightsDirectionZSpinner, javax.swing.JSpinner spotLightsSpreadAngleSpinner, javax.swing.JSpinner spotLightsConcentrationSpinner, javax.media.j3d.TransformGroup sceneTransform)
          Constructor for having a Spot light in the 3D Scene.
 
Method Summary
 javax.swing.JSpinner getAttenuationXSpinner()
          Get the spinner to control the X Attenuation of the light.
 javax.swing.JSpinner getAttenuationYSpinner()
          Get the spinner to control the Y Attenuation of the light.
 javax.swing.JSpinner getAttenuationZSpinner()
          Get the spinner to control the Z Attenuation of the light.
 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 getConcentrationSpinner()
          Get the spinner to control the Concentration 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.
 javax.swing.JSpinner getPositionXSpinner()
          Get the spinner to control the X Position of the light.
 javax.swing.JSpinner getPositionYSpinner()
          Get the spinner to control the Y Position of the light.
 javax.swing.JSpinner getPositionZSpinner()
          Get the spinner to control the Z Position of the light.
 javax.swing.JSpinner getSpreadAngleSpinner()
          Get the spinner to control the Spread Angle of the light.
 void set(boolean on)
          Set or unset the light.
 void updateAttenuation()
          Update the light attenuation according to the associated Spinners values.
 void updateColor()
          Update the light color according to the associated Spinners values.
 void updateConcentration()
          Update the light concentration according to the associated Spinner value.
 void updateDirection()
          Update the light direction according to the associated Spinners values.
 void updatePosition()
          Update the light position according to the associated Spinners values.
 void updateSpreadAngle()
          Update the light spread angle according to the associated Spinner value.
 
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

spotLightButton

private javax.swing.JRadioButton spotLightButton

spotLightsColorRSpinner

private javax.swing.JSpinner spotLightsColorRSpinner

spotLightsColorGSpinner

private javax.swing.JSpinner spotLightsColorGSpinner

spotLightsColorBSpinner

private javax.swing.JSpinner spotLightsColorBSpinner

spotLightsPositionXSpinner

private javax.swing.JSpinner spotLightsPositionXSpinner

spotLightsPositionYSpinner

private javax.swing.JSpinner spotLightsPositionYSpinner

spotLightsPositionZSpinner

private javax.swing.JSpinner spotLightsPositionZSpinner

spotLightsAttenuationXSpinner

private javax.swing.JSpinner spotLightsAttenuationXSpinner

spotLightsAttenuationYSpinner

private javax.swing.JSpinner spotLightsAttenuationYSpinner

spotLightsAttenuationZSpinner

private javax.swing.JSpinner spotLightsAttenuationZSpinner

spotLightsDirectionXSpinner

private javax.swing.JSpinner spotLightsDirectionXSpinner

spotLightsDirectionYSpinner

private javax.swing.JSpinner spotLightsDirectionYSpinner

spotLightsDirectionZSpinner

private javax.swing.JSpinner spotLightsDirectionZSpinner

spotLightsSpreadAngleSpinner

private javax.swing.JSpinner spotLightsSpreadAngleSpinner

spotLightsConcentrationSpinner

private javax.swing.JSpinner spotLightsConcentrationSpinner

light

private javax.media.j3d.BranchGroup light

sceneTransform

private javax.media.j3d.TransformGroup sceneTransform
Constructor Detail

SpotLightObject

public SpotLightObject(javax.swing.JRadioButton spotLightButton,
                       javax.swing.JSpinner spotLightsColorRSpinner,
                       javax.swing.JSpinner spotLightsColorGSpinner,
                       javax.swing.JSpinner spotLightsColorBSpinner,
                       javax.swing.JSpinner spotLightsPositionXSpinner,
                       javax.swing.JSpinner spotLightsPositionYSpinner,
                       javax.swing.JSpinner spotLightsPositionZSpinner,
                       javax.swing.JSpinner spotLightsAttenuationXSpinner,
                       javax.swing.JSpinner spotLightsAttenuationYSpinner,
                       javax.swing.JSpinner spotLightsAttenuationZSpinner,
                       javax.swing.JSpinner spotLightsDirectionXSpinner,
                       javax.swing.JSpinner spotLightsDirectionYSpinner,
                       javax.swing.JSpinner spotLightsDirectionZSpinner,
                       javax.swing.JSpinner spotLightsSpreadAngleSpinner,
                       javax.swing.JSpinner spotLightsConcentrationSpinner,
                       javax.media.j3d.TransformGroup sceneTransform)
Constructor for having a Spot light in the 3D Scene.

Parameters:
spotLightButton - the JRadioButton to set or unset this light.
spotLightsColorRSpinner - a spinner to control the R Value of the light.
spotLightsColorGSpinner - a spinner to control the G Value of the light.
spotLightsColorBSpinner - a spinner to control the B Value of the light.
spotLightsPositionXSpinner - a spinner to control the light position according the X axis.
spotLightsPositionYSpinner - a spinner to control the light position according the Y axis.
spotLightsPositionZSpinner - a spinner to control the light position according the Z axis.
spotLightsAttenuationXSpinner - a spinner to control the light attenuation according the X axis.
spotLightsAttenuationYSpinner - a spinner to control the light attenuation according the Y axis.
spotLightsAttenuationZSpinner - a spinner to control the light attenuation according the Z axis.
spotLightsDirectionXSpinner - a spinner to control the light direction according the X axis.
spotLightsDirectionYSpinner - a spinner to control the light direction according the Y axis.
spotLightsDirectionZSpinner - a spinner to control the light direction according the Z axis.
spotLightsSpreadAngleSpinner - a spinner to control the Spread Angle of the light.
spotLightsConcentrationSpinner - a spinner to control the Concentration of the light.
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.


getPositionXSpinner

public javax.swing.JSpinner getPositionXSpinner()
Get the spinner to control the X Position of the light.


getPositionYSpinner

public javax.swing.JSpinner getPositionYSpinner()
Get the spinner to control the Y Position of the light.


getPositionZSpinner

public javax.swing.JSpinner getPositionZSpinner()
Get the spinner to control the Z Position 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.


getAttenuationXSpinner

public javax.swing.JSpinner getAttenuationXSpinner()
Get the spinner to control the X Attenuation of the light.


getAttenuationYSpinner

public javax.swing.JSpinner getAttenuationYSpinner()
Get the spinner to control the Y Attenuation of the light.


getAttenuationZSpinner

public javax.swing.JSpinner getAttenuationZSpinner()
Get the spinner to control the Z Attenuation of the light.


getSpreadAngleSpinner

public javax.swing.JSpinner getSpreadAngleSpinner()
Get the spinner to control the Spread Angle of the light.


getConcentrationSpinner

public javax.swing.JSpinner getConcentrationSpinner()
Get the spinner to control the Concentration 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.


updatePosition

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


updateAttenuation

public void updateAttenuation()
Update the light attenuation 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.


updateSpreadAngle

public void updateSpreadAngle()
Update the light spread angle according to the associated Spinner value. Called when an event is detected on the corresponding Spinner.


updateConcentration

public void updateConcentration()
Update the light concentration according to the associated Spinner value. 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.

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