VTK  9.2.20230610
vtkBond.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBond.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 vtkBond_h
25 #define vtkBond_h
26 
27 #include "vtkAtom.h" // For vtkAtom
28 #include "vtkCommonDataModelModule.h" // For export macro
29 #include "vtkObject.h" // For macros, etc
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class vtkMolecule;
33 
34 class VTKCOMMONDATAMODEL_EXPORT vtkBond
35 {
36 public:
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
42  vtkIdType GetId() const;
43 
47  vtkMolecule* GetMolecule();
48 
50 
56 
58 
67 
71  unsigned short GetOrder();
72 
79  double GetLength() const;
80 
81 protected:
82  friend class vtkMolecule;
83 
84  vtkBond(vtkMolecule* parent, vtkIdType id, vtkIdType beginAtomId, vtkIdType endAtomId);
85 
90 };
91 
92 inline vtkIdType vtkBond::GetId() const
93 {
94  return this->Id;
95 }
96 
98 {
99  return this->Molecule;
100 }
101 
102 VTK_ABI_NAMESPACE_END
103 #endif
104 // VTK-HeaderTest-Exclude: vtkBond.h
convenience proxy for vtkMolecule
Definition: vtkAtom.h:36
convenience proxy for vtkMolecule
Definition: vtkBond.h:35
vtkIdType EndAtomId
Definition: vtkBond.h:89
vtkIdType GetEndAtomId() const
Get the starting / ending atom ids for this bond.
vtkAtom GetEndAtom() const
Get a vtkAtom object that refers to the starting / ending atom for this bond.
vtkMolecule * Molecule
Definition: vtkBond.h:86
unsigned short GetOrder()
Get the bond order for this bond.
vtkIdType GetId() const
Return the Id used to identify this bond in the parent molecule.
Definition: vtkBond.h:92
vtkAtom GetBeginAtom() const
Get a vtkAtom object that refers to the starting / ending atom for this bond.
vtkMolecule * GetMolecule()
Return the parent molecule of this bond.
Definition: vtkBond.h:97
vtkIdType GetBeginAtomId() const
Get the starting / ending atom ids for this bond.
void PrintSelf(ostream &os, vtkIndent indent)
vtkAtom GetEndAtom()
Get a vtkAtom object that refers to the starting / ending atom for this bond.
vtkIdType BeginAtomId
Definition: vtkBond.h:88
vtkIdType Id
Definition: vtkBond.h:87
vtkAtom GetBeginAtom()
Get a vtkAtom object that refers to the starting / ending atom for this bond.
vtkBond(vtkMolecule *parent, vtkIdType id, vtkIdType beginAtomId, vtkIdType endAtomId)
double GetLength() const
Get the distance between the bonded atoms.
a simple class to control print indentation
Definition: vtkIndent.h:120
class describing a molecule
Definition: vtkMolecule.h:115
int vtkIdType
Definition: vtkType.h:327