/// This file is part of the X3DToolKit library
/// Copyright (C) 2002-2004  Yannick Le Goc (legoc@imag.fr)

/// http://artis.imag.fr/Members/Yannick.Legoc/X3D/

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

/// This library 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
/// Lesser General Public License for more details.

/// You should have received a copy of the GNU Lesser General Public
/// License along with this library; if not, write to the Free Software
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#ifndef X3DTK_X3D_X3DLIGHTNODE
#define X3DTK_X3D_X3DLIGHTNODE

#include "X3DTypes.h"
#include "X3D_X3DChildNode.h"

namespace X3DTK {
namespace X3D {

/*! \brief Base class declared in <b><X3DTK/X3D/scenegraph.h></b>, part of the <a href="../../doc/X3DSpecs/Part01/components/lighting.html">
 *  Lighting component</a> defining an X3DLightNode
 *  (<a href="../../doc/X3DSpecs/Part01/components/lighting.html#X3DLightNode">
 *  documentation</a>).
 *
 *  \ingroup X3DSceneGraph
 */

class X3DLightNode : public X3DChildNode
{
public:
  /// Constructor.
  X3DLightNode();
  /// Destructor.
  virtual ~X3DLightNode();
  
  /// Sets the ambientIntensity attribute.
  void setAmbientIntensity(const SFFloat &ambientIntensity);
  /// Sets the color attribute.
  void setColor(const SFColor &color);
  /// Sets the intensity attribute.
  void setIntensity(const SFFloat &intensity);
  /// Sets the on attribute.
  void setOn(const SFBool &on);

  /// Gets the ambientIntensity attribute.
  inline const SFFloat &getAmbientIntensity() const {return _ambientIntensity;};
  /// Gets the color attribute.
  inline const SFColor &getColor() const {return _color;};
  /// Gets the intensity attribute.
  inline const SFFloat &getIntensity() const {return _intensity;};
  /// Gets the on attribute.
  inline const SFBool &getOn() const {return _on;};
  
private:
  /// Intensity of the ambient emission from the light.
  SFFloat _ambientIntensity;
  /// Spectral colour properties of both the direct and ambient light emission.
  SFColor _color;
  /// Brightness of the direct emission from the light.
  SFFloat _intensity;
  /// Enable/disable the light.
  SFBool _on;
};

}
}

#endif
