VTK
vtkXYZMolReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXYZMolReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkXYZMolReader_h
29 #define vtkXYZMolReader_h
30 
31 #include "vtkIOGeometryModule.h" // For export macro
32 #include "vtkMoleculeReaderBase.h"
33 
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
41  static vtkXYZMolReader *New();
42 
44  virtual int CanReadFile(const char* name);
45 
47 
49  vtkSetMacro(TimeStep, int);
50  vtkGetMacro(TimeStep, int);
52 
54 
55  vtkGetMacro(MaxTimeStep, int);
57 
58 protected:
60  ~vtkXYZMolReader();
61 
62  void ReadSpecificMolecule(FILE* fp);
63 
66  char* GetNextLine(FILE* fp, char* line, int maxlen);
67 
68  int GetLine1(const char* line, int *cnt);
69  int GetLine2(const char* line, char *name);
70  int GetAtom(const char* line, char* atom, float *x);
71 
72  void InsertAtom(const char* atom, float *pos);
73 
74  vtkSetMacro(MaxTimeStep, int);
75 
76  int TimeStep;
78 
79 private:
80  vtkXYZMolReader(const vtkXYZMolReader&); // Not implemented.
81  void operator=(const vtkXYZMolReader&); // Not implemented.
82 };
83 
84 #endif
read Molecular Data files
virtual void ReadSpecificMolecule(FILE *fp)=0
#define VTKIOGEOMETRY_EXPORT
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
read Molecular Data files
a simple class to control print indentation
Definition: vtkIndent.h:38