VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkBond.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00023 #ifndef __vtkBond_h 00024 #define __vtkBond_h 00025 00026 #include "vtkCommonDataModelModule.h" // For export macro 00027 #include "vtkObject.h" // For macros, etc 00028 #include "vtkAtom.h" // For vtkAtom 00029 00030 class vtkMolecule; 00031 00032 class VTKCOMMONDATAMODEL_EXPORT vtkBond 00033 { 00034 public: 00035 ~vtkBond(); 00036 void PrintSelf(ostream &os, vtkIndent indent); 00037 00039 vtkIdType GetId() const; 00040 00042 vtkMolecule * GetMolecule(); 00043 00045 00046 vtkIdType GetBeginAtomId() const; 00047 vtkIdType GetEndAtomId() const; 00049 00051 00053 vtkAtom GetBeginAtom(); 00054 vtkAtom GetEndAtom(); 00055 const vtkAtom GetBeginAtom() const; 00056 const vtkAtom GetEndAtom() const; 00058 00060 unsigned short GetOrder(); 00061 00065 double GetLength() const; 00066 00067 protected: 00068 friend class vtkMolecule; 00069 00070 vtkBond(vtkMolecule *parent, vtkIdType id, 00071 vtkIdType beginAtomId, vtkIdType endAtomId); 00072 00073 vtkMolecule *Molecule; 00074 vtkIdType Id; 00075 vtkIdType BeginAtomId; 00076 vtkIdType EndAtomId; 00077 }; 00078 00079 inline vtkIdType vtkBond::GetId() const 00080 { 00081 return this->Id; 00082 } 00083 00084 inline vtkMolecule * vtkBond::GetMolecule() 00085 { 00086 return this->Molecule; 00087 } 00088 00089 #endif 00090 // VTK-HeaderTest-Exclude: vtkBond.h