VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXYZMolReader.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00028 #ifndef vtkXYZMolReader_h 00029 #define vtkXYZMolReader_h 00030 00031 #include "vtkIOGeometryModule.h" // For export macro 00032 #include "vtkMoleculeReaderBase.h" 00033 00034 00035 class VTKIOGEOMETRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase 00036 { 00037 public: 00038 vtkTypeMacro(vtkXYZMolReader,vtkMoleculeReaderBase); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 00041 static vtkXYZMolReader *New(); 00042 00044 virtual int CanReadFile(const char* name); 00045 00047 00049 vtkSetMacro(TimeStep, int); 00050 vtkGetMacro(TimeStep, int); 00052 00054 00055 vtkGetMacro(MaxTimeStep, int); 00057 00058 protected: 00059 vtkXYZMolReader(); 00060 ~vtkXYZMolReader(); 00061 00062 void ReadSpecificMolecule(FILE* fp); 00063 00066 char* GetNextLine(FILE* fp, char* line, int maxlen); 00067 00068 int GetLine1(const char* line, int *cnt); 00069 int GetLine2(const char* line, char *name); 00070 int GetAtom(const char* line, char* atom, float *x); 00071 00072 void InsertAtom(const char* atom, float *pos); 00073 00074 vtkSetMacro(MaxTimeStep, int); 00075 00076 int TimeStep; 00077 int MaxTimeStep; 00078 00079 private: 00080 vtkXYZMolReader(const vtkXYZMolReader&); // Not implemented. 00081 void operator=(const vtkXYZMolReader&); // Not implemented. 00082 }; 00083 00084 #endif