VTK  9.3.20240424
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
18VTK_ABI_NAMESPACE_BEGIN
19class vtkMolecule;
20class vtkVector3d;
21class vtkVector3f;
22
23class VTKCOMMONDATAMODEL_EXPORT vtkAtom
24{
25public:
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);
55 void SetPosition(const vtkVector3f& pos);
57
58protected:
59 friend class vtkMolecule;
60
62
65};
66
68{
69 return this->Id;
70}
71
73{
74 return this->Molecule;
75}
76
77VTK_ABI_NAMESPACE_END
78#endif
79// VTK-HeaderTest-Exclude: vtkAtom.h
convenience proxy for vtkMolecule
Definition vtkAtom.h:24
vtkMolecule * GetMolecule()
Return the parent molecule of this atom.
Definition vtkAtom.h:72
void GetPosition(double pos[3]) const
Get/Set the position of this atom.
vtkIdType Id
Definition vtkAtom.h:64
vtkAtom(vtkMolecule *parent, vtkIdType id)
void SetPosition(float x, float y, float z)
Get/Set the position of this atom.
void PrintSelf(ostream &os, vtkIndent indent)
void GetPosition(float pos[3]) const
Get/Set the position of this atom.
vtkMolecule * Molecule
Definition vtkAtom.h:63
unsigned short GetAtomicNumber() const
Get/Set the atomic number of this atom.
void SetPosition(const vtkVector3f &pos)
Get/Set the position of this atom.
void SetPosition(const float pos[3])
Get/Set the position of this atom.
void SetAtomicNumber(unsigned short atomicNum)
Get/Set the atomic number of this atom.
vtkVector3f GetPosition() const
Get/Set the position of this atom.
vtkIdType GetId() const
Return the Id used to identify this atom in the parent molecule.
Definition vtkAtom.h:67
a simple class to control print indentation
Definition vtkIndent.h:108
class describing a molecule
Definition vtkMolecule.h:84
int vtkIdType
Definition vtkType.h:315