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

#include <fstream>

class gmafDataStructure;

class gmafPolyhedron;
class gmafQuadMap;
class gmafPCCMQuadMap;


/**
  gmafDataStructureManager 
*/
class gmafDataStructureManager{
// ENUMS
public:

// VARIABLES
/**@name Class Variables */
//@{
protected:

private:
  gmafPolyhedron* mpMesh;
  gmafQuadMap* mpQuadMap;
  gmafPCCMQuadMap* mpPCCMQuadMap;

  float mCenterX;
  float mCenterY;
  float mCenterZ;

  float mMinX;
  float mMaxX;
  float mMinY;
  float mMaxY;
  float mMinZ;
  float mMaxZ;
//@}

// METHODS
/**@name Class Methods */
//@{
public:
  /**
     Constructor of gmafDataStructureManager.
  */    
  gmafDataStructureManager();
  /**
     Destructor of gmafDataStructureManager.
  */    
  virtual ~gmafDataStructureManager();
  
  /**
     Set the main (input) object (polyhedron mesh)
   */
  //inline void setMesh(gmafPolyhedron* mesh) { mpMesh = mesh; }
  inline gmafPolyhedron* getMesh() { return mpMesh; }
  gmafPolyhedron* importMesh(std::ifstream& file);

  inline gmafQuadMap* getQuadMap() { return mpQuadMap; }
  gmafQuadMap* createQuadMap();
  
  inline gmafPCCMQuadMap* getPCCMQuadMap() { return mpPCCMQuadMap; }
  gmafPCCMQuadMap* createPCCMQuadMap(); 

  inline float centerX() { return mCenterX; }
  inline float centerY() { return mCenterY; }
  inline float centerZ() { return mCenterZ; }

  inline float minX() { return mMinX; }
  inline float maxX() { return mMaxX; }
  inline float minY() { return mMinY; }
  inline float maxY() { return mMaxY; }
  inline float minZ() { return mMinZ; }
  inline float maxZ() { return mMaxZ; }

protected:
  void cleanAll();

private:
};


#endif gmafDataStructureManager_H
