Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00045 #ifndef __vtkMassProperties_h
00046 #define __vtkMassProperties_h
00047 
00048 #include "vtkProcessObject.h"
00049 
00050 class vtkPolyData;
00051 
00052 class VTK_GRAPHICS_EXPORT vtkMassProperties : public vtkProcessObject
00053 {
00054 public:
00056   static vtkMassProperties *New();
00057 
00058   vtkTypeRevisionMacro(vtkMassProperties,vtkProcessObject);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062   double GetVolume() {this->Update(); return this->Volume;}
00063 
00065 
00067   double GetVolumeX() {this->Update(); return this->VolumeX;}
00068   double GetVolumeY() {this->Update(); return this->VolumeY;}
00069   double GetVolumeZ() {this->Update(); return this->VolumeZ;}
00071 
00073 
00075   double GetKx() {this->Update(); return this->Kx;}
00076   double GetKy() {this->Update(); return this->Ky;}
00077   double GetKz() {this->Update(); return this->Kz;}
00079 
00081   double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
00082 
00084 
00087   double GetNormalizedShapeIndex() 
00088     {this->Update(); return this->NormalizedShapeIndex;}
00090 
00091   void Update();
00092   
00093   void SetInput(vtkPolyData *input);
00094   vtkPolyData *GetInput();
00095 
00096 protected:
00097   vtkMassProperties();
00098   ~vtkMassProperties();
00099 
00100   void Execute();
00101 
00102   double  SurfaceArea;
00103   double  Volume;
00104   double  VolumeX;
00105   double  VolumeY;
00106   double  VolumeZ;
00107   double  Kx;
00108   double  Ky;
00109   double  Kz;
00110   double  NormalizedShapeIndex;
00111   vtkTimeStamp ExecuteTime;
00112 
00113 private:
00114   vtkMassProperties(const vtkMassProperties&);  // Not implemented.
00115   void operator=(const vtkMassProperties&);  // Not implemented.
00116 };
00117 
00118 #endif
00119 
00120