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   ~vtkAtom();
00037 
00038   void PrintSelf(ostream &os, vtkIndent indent);
00039 
00041   vtkIdType GetId() const;
00042 
00044   vtkMolecule * GetMolecule();
00045 
00047 
00048   unsigned short GetAtomicNumber() const;
00049   void SetAtomicNumber(unsigned short atomicNum);
00051 
00053 
00054   void GetPosition(float pos[3]) const;
00055   void GetPosition(double pos[3]) const;
00056   void SetPosition(const float pos[3]);
00057   void SetPosition(float x, float y, float z);
00058   vtkVector3f GetPosition() const;
00059   void SetPosition(const vtkVector3f &pos);
00061 
00062  protected:
00063   friend class vtkMolecule;
00064 
00065   vtkAtom(vtkMolecule *parent, vtkIdType id);
00066 
00067   vtkMolecule *Molecule;
00068   vtkIdType Id;
00069 };
00070 
00071 inline vtkIdType vtkAtom::GetId() const
00072 {
00073   return this->Id;
00074 }
00075 
00076 inline vtkMolecule * vtkAtom::GetMolecule()
00077 {
00078   return this->Molecule;
00079 }
00080 
00081 #endif
00082 // VTK-HeaderTest-Exclude: vtkAtom.h