/// 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 MESH_PRIMITIVEMESHBUILDERSTATEVARIABLES_H
#define MESH_PRIMITIVEMESHBUILDERSTATEVARIABLES_H

#include "StateVariables.h"

namespace X3DTK {
namespace MESH {

/*! \brief Class declared in <b><X3DTK/MESH/primitivemeshbuilder.h></b> providing the StateVariables
 *  of the MESH::PrimitiveStateVariables processor.
 *
 *  \ingroup MESH
 */

class PrimitiveMeshBuilderStateVariables : public StateVariables
{
public:
  /// Constructor.
  PrimitiveMeshBuilderStateVariables();
  
  void addNode(SFNode N);
  bool getNode(SFNode N) const;
  void addToDeleteNode(SFNode N);
  
  void setParameters(float step, bool boundingBox);
  void setCenter(const SFVec3f &center);
  void setSize(const SFVec3f &size);
  
  void init();
  void finish();
  
  inline float getStep() const {return _step;};
  inline bool getBoundingBox() const {return _boundingBox;};
  inline const SFVec3f &getCenter() const {return _center;};
  inline const SFVec3f &getSize() const {return _size;};
  
private:  
  float _step;
  bool _boundingBox;
  SFVec3f _center;
  SFVec3f _size;
  MFNode _visitedNodes;
  MFNode _toDeleteNodes;
};
  
}
}

#endif
