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

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 PointLightObject

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

 class PointLightObject
extends java.lang.Object

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


Field Summary
private  javax.media.j3d.BranchGroup light
           
private  javax.swing.JRadioButton pointLightButton
           
private  javax.swing.JSpinner pointLightsAttenuationXSpinner
           
private  javax.swing.JSpinner pointLightsAttenuationYSpinner
           
private  javax.swing.JSpinner pointLightsAttenuationZSpinner
           
private  javax.swing.JSpinner pointLightsColorBSpinner
           
private  javax.swing.JSpinner pointLightsColorGSpinner
           
private  javax.swing.JSpinner pointLightsColorRSpinner
           
private  javax.swing.JSpinner pointLightsPositionXSpinner
           
private  javax.swing.JSpinner pointLightsPositionYSpinner
           
private  javax.swing.JSpinner pointLightsPositionZSpinner
           
private  javax.media.j3d.TransformGroup sceneTransform
           
private static long serialVersionUID
           
 
Constructor Summary
PointLightObject(javax.swing.JRadioButton pointLightButton, javax.swing.JSpinner pointLightsColorRSpinner, javax.swing.JSpinner pointLightsColorGSpinner, javax.swing.JSpinner pointLightsColorBSpinner, javax.swing.JSpinner pointLightsPositionXSpinner, javax.swing.JSpinner pointLightsPositionYSpinner, javax.swing.JSpinner pointLightsPositionZSpinner, javax.swing.JSpinner pointLightsAttenuationXSpinner, javax.swing.JSpinner pointLightsAttenuationYSpinner, javax.swing.JSpinner pointLightsAttenuationZSpinner, javax.media.j3d.TransformGroup sceneTransform)
          Constructor for having a Point 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 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.
 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 updatePosition()
          Update the light position 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

pointLightButton

private javax.swing.JRadioButton pointLightButton

pointLightsColorRSpinner

private javax.swing.JSpinner pointLightsColorRSpinner

pointLightsColorGSpinner

private javax.swing.JSpinner pointLightsColorGSpinner

pointLightsColorBSpinner

private javax.swing.JSpinner pointLightsColorBSpinner

pointLightsPositionXSpinner

private javax.swing.JSpinner pointLightsPositionXSpinner

pointLightsPositionYSpinner

private javax.swing.JSpinner pointLightsPositionYSpinner

pointLightsPositionZSpinner

private javax.swing.JSpinner pointLightsPositionZSpinner

pointLightsAttenuationXSpinner

private javax.swing.JSpinner pointLightsAttenuationXSpinner

pointLightsAttenuationYSpinner

private javax.swing.JSpinner pointLightsAttenuationYSpinner

pointLightsAttenuationZSpinner

private javax.swing.JSpinner pointLightsAttenuationZSpinner

light

private javax.media.j3d.BranchGroup light

sceneTransform

private javax.media.j3d.TransformGroup sceneTransform
Constructor Detail

PointLightObject

public PointLightObject(javax.swing.JRadioButton pointLightButton,
                        javax.swing.JSpinner pointLightsColorRSpinner,
                        javax.swing.JSpinner pointLightsColorGSpinner,
                        javax.swing.JSpinner pointLightsColorBSpinner,
                        javax.swing.JSpinner pointLightsPositionXSpinner,
                        javax.swing.JSpinner pointLightsPositionYSpinner,
                        javax.swing.JSpinner pointLightsPositionZSpinner,
                        javax.swing.JSpinner pointLightsAttenuationXSpinner,
                        javax.swing.JSpinner pointLightsAttenuationYSpinner,
                        javax.swing.JSpinner pointLightsAttenuationZSpinner,
                        javax.media.j3d.TransformGroup sceneTransform)
Constructor for having a Point light in the 3D Scene.

Parameters:
pointLightButton - the JRadioButton to set or unset this light.
pointLightsColorRSpinner - a spinner to control the R Value of the light.
pointLightsColorGSpinner - a spinner to control the G Value of the light.
pointLightsColorBSpinner - a spinner to control the B Value of the light.
pointLightsPositionXSpinner - a spinner to control the light position according the X axis.
pointLightsPositionYSpinner - a spinner to control the light position according the Y axis.
pointLightsPositionZSpinner - a spinner to control the light position according the Z axis.
pointLightsAttenuationXSpinner - a spinner to control the light attenuation according the X axis.
pointLightsAttenuationYSpinner - a spinner to control the light attenuation according the Y axis.
pointLightsAttenuationZSpinner - a spinner to control the light attenuation 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.


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.


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.


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.



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

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.

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