VTK
dox/Common/DataModel/vtkAtom.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAtom.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 __vtkAtom_h
00024 #define __vtkAtom_h
00025 
00026 #include "vtkCommonDataModelModule.h" // For export macro
00027 #include "vtkObject.h" // For macros, defines, etc
00028 
00029 class vtkMolecule;
00030 class vtkVector3d;
00031 class vtkVector3f;
00032 
00033 class VTKCOMMONDATAMODEL_EXPORT vtkAtom
00034 {
00035  public:
00036   void PrintSelf(ostream &os, vtkIndent indent);
00037 
00039   vtkIdType GetId() const;
00040 
00042   vtkMolecule * GetMolecule();
00043 
00045 
00046   unsigned short GetAtomicNumber() const;
00047   void SetAtomicNumber(unsigned short atomicNum);
00049 
00051 
00052   void GetPosition(float pos[3]) const;
00053   void GetPosition(double pos[3]) const;
00054   void SetPosition(const float pos[3]);
00055   void SetPosition(float x, float y, float z);
00056   vtkVector3f GetPosition() const;
00057   void SetPosition(const vtkVector3f &pos);
00059 
00060  protected:
00061   friend class vtkMolecule;
00062 
00063   vtkAtom(vtkMolecule *parent, vtkIdType id);
00064 
00065   vtkMolecule *Molecule;
00066   vtkIdType Id;
00067 };
00068 
00069 inline vtkIdType vtkAtom::GetId() const
00070 {
00071   return this->Id;
00072 }
00073 
00074 inline vtkMolecule * vtkAtom::GetMolecule()
00075 {
00076   return this->Molecule;
00077 }
00078 
00079 #endif
00080 // VTK-HeaderTest-Exclude: vtkAtom.h