/****************************************************************************
** GMAF - The Geometry Modeling Algorithms Framework
**
** Created : 03112000
**
** Copyright (C) 2000 by Le-Jeng Shiue.  All rights reserved.
**
****************************************************************************/

#ifndef cgalPolyhedronBuilder_H
#define cgalPolyhedronBuilder_H

#include <iostream>

#include <CGAL/Polyhedron_incremental_builder_3.h>


typedef vector<Point>     Pvector;
typedef Pvector::iterator Pitr;


/**
  PolyhedronBuilder is a modifier (check CGAL ref.) creating a polyhedron
  from a input stream.
*/
template <class HDS>
class cgalPolyhedronBuilder : public CGAL::Modifier_base<HDS> {
// ENUMS
public:

// VARIABLES
/**@name Class Variables */
//@{
public:
    float mXmin, mYmin, mZmin;
    float mXmax, mYmax, mZmax;
protected:
    istream* mpInFile;
    void*    mpInDataStructure;

private:
    
//@}

// METHODS
/**@name Class Methods */
//@{
public:
    cgalPolyhedronBuilder(std::istream* in);
    virtual ~cgalPolyhedronBuilder();

    void operator()(HDS& hds);

protected:

private:
    void importMesh(CGAL::Polyhedron_incremental_builder_3<HDS>& B);

//@}
};

#endif cgalPolyhedronBuilder_H
