#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/3D/MeshIO/MeshIOObj.hh" // This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here #ifndef RAVL_MESHOBJIO_HEADER #define RAVL_MESHOBJIO_HEADER 1 /////////////////////////////////////////////////////////////////// //! rcsid="$Id: MeshIOObj.hh,v 1.2 2002/01/31 14:55:28 craftit Exp $" //! lib=Ravl3DIO //! docentry="Ravl.3D.IO" //! file="Ravl/3D/MeshIO/MeshIOObj.hh" #include "Ravl/3D/TriMesh.hh" #include "Ravl/DP/Port.hh" #include "Ravl/Stream.hh" namespace Ravl3DN { //! userlevel=Develop //: Tri file IO. class DPIMeshObjBodyC : public DPIPortBodyC { public: DPIMeshObjBodyC(const StringC &fn); //: Open file. DPIMeshObjBodyC(IStreamC &is); //: Open stream. virtual bool IsGetEOS() const; //: Is valid data ? virtual TriMeshC Get(); //: Get next piece of data. protected: IStreamC inf; bool done; }; //! userlevel=Advanced //: Tri file IO. class DPIMeshObjC : public DPIPortC { public: DPIMeshObjC(const StringC &fn) : DPEntityC(*new DPIMeshObjBodyC(fn)) {} //: Open file. DPIMeshObjC(IStreamC &is) : DPEntityC(*new DPIMeshObjBodyC(is)) {} //: Open a stream. }; //! userlevel=Develop //: Tri file IO. class DPOMeshObjBodyC : public DPOPortBodyC { public: DPOMeshObjBodyC(const StringC &fn); //: Open file. DPOMeshObjBodyC(OStreamC &is); //: Open stream. virtual bool Put(const TriMeshC &dat); //: Put data. virtual bool IsPutReady() const; //: Is port ready for data ? protected: OStreamC outf; bool done; }; //! userlevel=Advanced //: Tri file IO. class DPOMeshObjC : public DPOPortC { public: DPOMeshObjC(const StringC &fn) : DPEntityC(*new DPOMeshObjBodyC(fn)) {} //: Open file. DPOMeshObjC(OStreamC &is) : DPEntityC(*new DPOMeshObjBodyC(is)) {} //: Open a stream. }; } #endif