VTK  9.3.1
vtkAtom.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkAtom_h
13 #define vtkAtom_h
14 
15 #include "vtkCommonDataModelModule.h" // For export macro
16 #include "vtkObject.h" // For macros, defines, etc
17 
18 VTK_ABI_NAMESPACE_BEGIN
19 class vtkMolecule;
20 class vtkVector3d;
21 class vtkVector3f;
22 
23 class VTKCOMMONDATAMODEL_EXPORT vtkAtom
24 {
25 public:
26  void PrintSelf(ostream& os, vtkIndent indent);
27 
31  vtkIdType GetId() const;
32 
36  vtkMolecule* GetMolecule();
37 
39 
42  unsigned short GetAtomicNumber() const;
43  void SetAtomicNumber(unsigned short atomicNum);
45 
47 
50  void GetPosition(float pos[3]) const;
51  void GetPosition(double pos[3]) const;
52  void SetPosition(const float pos[3]);
53  void SetPosition(float x, float y, float z);
54  vtkVector3f GetPosition() const;
55  void SetPosition(const vtkVector3f& pos);
57 
58 protected:
59  friend class vtkMolecule;
60 
61  vtkAtom(vtkMolecule* parent, vtkIdType id);
62 
65 };
66 
67 inline vtkIdType vtkAtom::GetId() const
68 {
69  return this->Id;
70 }
71 
73 {
74  return this->Molecule;
75 }
76 
77 VTK_ABI_NAMESPACE_END
78 #endif
79 // VTK-HeaderTest-Exclude: vtkAtom.h
vtkIdType Id
Definition: vtkAtom.h:64
class describing a molecule
Definition: vtkMolecule.h:83
int vtkIdType
Definition: vtkType.h:315
vtkMolecule * Molecule
Definition: vtkAtom.h:63
a simple class to control print indentation
Definition: vtkIndent.h:28
friend class vtkAtom
Definition: vtkMolecule.h:456
vtkMolecule * GetMolecule()
Return the parent molecule of this atom.
Definition: vtkAtom.h:72
convenience proxy for vtkMolecule
Definition: vtkAtom.h:23
vtkIdType GetId() const
Return the Id used to identify this atom in the parent molecule.
Definition: vtkAtom.h:67