/// 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_NURBSTEXTURESURFACE
#define X3DTK_X3D_NURBSTEXTURESURFACE

#include "X3DTypes.h"
#include "X3D_X3DTextureCoordinateNode.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/nurbs.html">
 *  NURBS component</a> defining a NurbsTextureSurface
 *  (<a href="../../doc/X3DSpecs/Part01/components/nurbs.html#NurbsTextureSurface">
 *  documentation</a>).
 *
 *  \ingroup X3DSceneGraph
 */

class NurbsTextureSurface : public X3DTextureCoordinateNode
{
public:
  /// Constructor.
  NurbsTextureSurface();
  /// Destructor.
  virtual ~NurbsTextureSurface();
  
  /// Sets the controlPoint attribute.
  void setControlPoint(const MFVec2f &controlPoint);
  /// Sets the weight attribute.
  void setWeight(const MFFloat &weight);
  /// Sets the uDimension attribute.
  void setUDimension(const SFInt32 &uDimension);
  /// Sets the vDimension attribute.
  void setVDimension(const SFInt32 &vDimension);
  /// Sets the uKnot attribute.
  void setUKnot(const MFDouble &uKnot);
  /// Sets the vKnot attribute.
  void setVKnot(const MFDouble &vKnot);
  /// Sets the uOrder attribute.
  void setUOrder(const SFInt32 &uOrder);
  /// Sets the vOrder attribute.
  void setVOrder(const SFInt32 &vOrder);

  /// Gets the controlPoint attribute.
  inline const MFVec2f &getControlPoint() const {return _controlPoint;};
  /// Gets the weight attribute.
  inline const MFFloat &getWeight() const {return _weight;};
  /// Gets the uDimension attribute.
  inline const SFInt32 &getUDimension() const {return _uDimension;};
  /// Gets the vDimension attribute.
  inline const SFInt32 &getVDimension() const {return _vDimension;};
  /// Gets the uKnot attribute.
  inline const MFDouble &getUKnot() const {return _uKnot;};
  /// Gets the vKnot attribute.
  inline const MFDouble &getVKnot() const {return _vKnot;};
  /// Gets the uOrder attribute.
  inline const SFInt32 &getUOrder() const {return _uOrder;};
  /// Gets the vOrder attribute.
  inline const SFInt32 &getVOrder() const {return _vOrder;};

private:
  /// Set of control points of dimension _uDimension * _vDimension.
  MFVec2f _controlPoint;
  /// Weight values assigned to each control point.
  MFFloat _weight;
  /// Number of control points in the u direction.
  SFInt32 _uDimension;
  /// Number of control points in the v direction.
  SFInt32 _vDimension;
  /// Knot vector in the u direction.
  MFDouble _uKnot;
  /// Knot vector in the v direction.
  MFDouble _vKnot;
  /// Order in the u direction.
  SFInt32 _uOrder;
  /// Order in the v direction.
  SFInt32 _vOrder;
};

}
}

#endif
