vtkXYZMolReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00039 #ifndef __vtkXYZMolReader_h
00040 #define __vtkXYZMolReader_h
00041
00042 #include "vtkMoleculeReaderBase.h"
00043
00044
00045 class VTK_IO_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
00046 {
00047 public:
00048 vtkTypeRevisionMacro(vtkXYZMolReader,vtkMoleculeReaderBase);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00051 static vtkXYZMolReader *New();
00052
00054 virtual int CanReadFile(const char* name);
00055
00057
00059 vtkSetMacro(TimeStep, int);
00060 vtkGetMacro(TimeStep, int);
00062
00064
00065 vtkGetMacro(MaxTimeStep, int);
00067
00068 protected:
00069 vtkXYZMolReader();
00070 ~vtkXYZMolReader();
00071
00072 void ReadSpecificMolecule(FILE* fp);
00073
00076 char* GetNextLine(FILE* fp, char* line, int maxlen);
00077
00078 int GetLine1(const char* line, int *cnt);
00079 int GetLine2(const char* line, char *name);
00080 int GetAtom(const char* line, char* atom, float *x);
00081
00082 void InsertAtom(const char* atom, float *pos);
00083
00084 vtkSetMacro(MaxTimeStep, int);
00085
00086 int TimeStep;
00087 int MaxTimeStep;
00088
00089 private:
00090 vtkXYZMolReader(const vtkXYZMolReader&);
00091 void operator=(const vtkXYZMolReader&);
00092 };
00093
00094 #endif