Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkMassProperties.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMassProperties.h,v $
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 =========================================================================*/
00054 #ifndef __vtkMassProperties_h
00055 #define __vtkMassProperties_h
00056 
00057 #include "vtkProcessObject.h"
00058 
00059 class vtkPolyData;
00060 
00061 class VTK_GRAPHICS_EXPORT vtkMassProperties : public vtkProcessObject
00062 {
00063 public:
00065   static vtkMassProperties *New();
00066 
00067   vtkTypeRevisionMacro(vtkMassProperties,vtkProcessObject);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069 
00071   double GetVolume() {this->Update(); return this->Volume;}
00072 
00074 
00076   double GetVolumeX() {this->Update(); return this->VolumeX;}
00077   double GetVolumeY() {this->Update(); return this->VolumeY;}
00078   double GetVolumeZ() {this->Update(); return this->VolumeZ;}
00080 
00082 
00084   double GetKx() {this->Update(); return this->Kx;}
00085   double GetKy() {this->Update(); return this->Ky;}
00086   double GetKz() {this->Update(); return this->Kz;}
00088 
00090   double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
00091 
00093 
00096   double GetNormalizedShapeIndex() 
00097     {this->Update(); return this->NormalizedShapeIndex;}
00099 
00100   void Update();
00101   
00102   void SetInput(vtkPolyData *input);
00103   vtkPolyData *GetInput();
00104 
00105 protected:
00106   vtkMassProperties();
00107   ~vtkMassProperties();
00108 
00109   void Execute();
00110 
00111   double  SurfaceArea;
00112   double  Volume;
00113   double  VolumeX;
00114   double  VolumeY;
00115   double  VolumeZ;
00116   double  Kx;
00117   double  Ky;
00118   double  Kz;
00119   double  NormalizedShapeIndex;
00120   vtkTimeStamp ExecuteTime;
00121 
00122 private:
00123   vtkMassProperties(const vtkMassProperties&);  // Not implemented.
00124   void operator=(const vtkMassProperties&);  // Not implemented.
00125 };
00126 
00127 #endif
00128 
00129