Skip to content
Snippets Groups Projects
vtkGeometryCacheWriter.h 1.87 KiB
Newer Older
Sri Nagella's avatar
Sri Nagella committed
#ifndef VTKGEOMETRYCACHEWRITER_H
#define VTKGEOMETRYCACHEWRITER_H

Sri Nagella's avatar
Sri Nagella committed
#include <string>
namespace Poco {
namespace XML {
class Document;
class Element;
Sri Nagella's avatar
Sri Nagella committed
}
}
namespace Mantid {

namespace Geometry {
/**
   \class vtkGeometryCacheWriter
   \brief Writes the Geometry from Object to Cache
   \author Srikanth Nagella
   \date January 2009
   \version 1.0
Sri Nagella's avatar
Sri Nagella committed

   This class writes the geometry (triangles) cached from Object to the vtk
   format file.
Sri Nagella's avatar
Sri Nagella committed

   Copyright &copy; 2008 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
   National Laboratory & European Spallation Source
Sri Nagella's avatar
Sri Nagella committed

   This file is part of Mantid.
Sri Nagella's avatar
Sri Nagella committed

   Mantid is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
Sri Nagella's avatar
Sri Nagella committed

   Mantid 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 General Public License for more details.
Sri Nagella's avatar
Sri Nagella committed

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
Sri Nagella's avatar
Sri Nagella committed

   File change history is stored at: <https://github.com/mantidproject/mantid>
*/
class MANTID_GEOMETRY_DLL vtkGeometryCacheWriter {
private:
  Poco::XML::Document *mDoc; ///< The XML document
  Poco::XML::Element *mRoot; ///< The root XML element
  std::string mFileName;     ///< The file name
  // Private Methods
  void Init();
  void createVTKFileHeader();
Sri Nagella's avatar
Sri Nagella committed

public:
  vtkGeometryCacheWriter(std::string); ///< Constructor
  ~vtkGeometryCacheWriter();           ///< Destructor
  void addObject(CSGObject *obj);
  void write(); ///< Write the XML to a file
};
Sri Nagella's avatar
Sri Nagella committed

} // NAMESPACE Geometry
Sri Nagella's avatar
Sri Nagella committed

} // NAMESPACE Mantid
Sri Nagella's avatar
Sri Nagella committed

#endif