VTK
vtkAtom.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAtom.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 =========================================================================*/
24 #ifndef vtkAtom_h
25 #define vtkAtom_h
26 
27 #include "vtkCommonDataModelModule.h" // For export macro
28 #include "vtkObject.h" // For macros, defines, etc
29 
30 class vtkMolecule;
31 class vtkVector3d;
32 class vtkVector3f;
33 
34 class VTKCOMMONDATAMODEL_EXPORT vtkAtom
35 {
36  public:
37  void PrintSelf(ostream &os, vtkIndent indent);
38 
42  vtkIdType GetId() const;
43 
47  vtkMolecule * GetMolecule();
48 
50 
53  unsigned short GetAtomicNumber() const;
54  void SetAtomicNumber(unsigned short atomicNum);
56 
58 
61  void GetPosition(float pos[3]) const;
62  void GetPosition(double pos[3]) const;
63  void SetPosition(const float pos[3]);
64  void SetPosition(float x, float y, float z);
65  vtkVector3f GetPosition() const;
66  void SetPosition(const vtkVector3f &pos);
68 
69  protected:
70  friend class vtkMolecule;
71 
72  vtkAtom(vtkMolecule *parent, vtkIdType id);
73 
76 };
77 
78 inline vtkIdType vtkAtom::GetId() const
79 {
80  return this->Id;
81 }
82 
84 {
85  return this->Molecule;
86 }
87 
88 #endif
89 // VTK-HeaderTest-Exclude: vtkAtom.h
vtkIdType Id
Definition: vtkAtom.h:75
class describing a molecule
Definition: vtkMolecule.h:90
int vtkIdType
Definition: vtkType.h:287
vtkMolecule * Molecule
Definition: vtkAtom.h:74
a simple class to control print indentation
Definition: vtkIndent.h:39
friend class vtkAtom
Definition: vtkMolecule.h:377
vtkMolecule * GetMolecule()
Return the parent molecule of this atom.
Definition: vtkAtom.h:83
convenience proxy for vtkMolecule
Definition: vtkAtom.h:34
vtkIdType GetId() const
Return the Id used to identify this atom in the parent molecule.
Definition: vtkAtom.h:78