VTK  9.3.1
vtkBond.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 vtkBond_h
13 #define vtkBond_h
14 
15 #include "vtkAtom.h" // For vtkAtom
16 #include "vtkCommonDataModelModule.h" // For export macro
17 #include "vtkObject.h" // For macros, etc
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkMolecule;
21 
22 class VTKCOMMONDATAMODEL_EXPORT vtkBond
23 {
24 public:
25  void PrintSelf(ostream& os, vtkIndent indent);
26 
30  vtkIdType GetId() const;
31 
35  vtkMolecule* GetMolecule();
36 
38 
41  vtkIdType GetBeginAtomId() const;
42  vtkIdType GetEndAtomId() const;
44 
46 
50  vtkAtom GetBeginAtom();
51  vtkAtom GetEndAtom();
52  vtkAtom GetBeginAtom() const;
53  vtkAtom GetEndAtom() const;
55 
59  unsigned short GetOrder();
60 
67  double GetLength() const;
68 
69 protected:
70  friend class vtkMolecule;
71 
72  vtkBond(vtkMolecule* parent, vtkIdType id, vtkIdType beginAtomId, vtkIdType endAtomId);
73 
78 };
79 
80 inline vtkIdType vtkBond::GetId() const
81 {
82  return this->Id;
83 }
84 
86 {
87  return this->Molecule;
88 }
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
92 // VTK-HeaderTest-Exclude: vtkBond.h
class describing a molecule
Definition: vtkMolecule.h:83
vtkIdType Id
Definition: vtkBond.h:75
int vtkIdType
Definition: vtkType.h:315
vtkIdType GetId() const
Return the Id used to identify this bond in the parent molecule.
Definition: vtkBond.h:80
vtkIdType BeginAtomId
Definition: vtkBond.h:76
vtkMolecule * Molecule
Definition: vtkBond.h:74
vtkMolecule * GetMolecule()
Return the parent molecule of this bond.
Definition: vtkBond.h:85
a simple class to control print indentation
Definition: vtkIndent.h:28
friend class vtkBond
Definition: vtkMolecule.h:457
convenience proxy for vtkMolecule
Definition: vtkAtom.h:23
vtkIdType EndAtomId
Definition: vtkBond.h:77
convenience proxy for vtkMolecule
Definition: vtkBond.h:22