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

dox/Graphics/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 =========================================================================*/ 00041 #ifndef __vtkMassProperties_h 00042 #define __vtkMassProperties_h 00043 00044 #include "vtkProcessObject.h" 00045 00046 class vtkPolyData; 00047 00048 class VTK_GRAPHICS_EXPORT vtkMassProperties : public vtkProcessObject 00049 { 00050 public: 00052 static vtkMassProperties *New(); 00053 00054 vtkTypeRevisionMacro(vtkMassProperties,vtkProcessObject); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00056 00058 double GetVolume() {this->Update(); return this->Volume;} 00059 00061 00063 double GetVolumeX() {this->Update(); return this->VolumeX;} 00064 double GetVolumeY() {this->Update(); return this->VolumeY;} 00065 double GetVolumeZ() {this->Update(); return this->VolumeZ;} 00067 00069 00071 double GetKx() {this->Update(); return this->Kx;} 00072 double GetKy() {this->Update(); return this->Ky;} 00073 double GetKz() {this->Update(); return this->Kz;} 00075 00077 double GetSurfaceArea() {this->Update(); return this->SurfaceArea;} 00078 00080 00083 double GetNormalizedShapeIndex() 00084 {this->Update(); return this->NormalizedShapeIndex;} 00086 00087 void Update(); 00088 00089 void SetInput(vtkPolyData *input); 00090 vtkPolyData *GetInput(); 00091 00092 protected: 00093 vtkMassProperties(); 00094 ~vtkMassProperties(); 00095 00096 void Execute(); 00097 00098 double SurfaceArea; 00099 double Volume; 00100 double VolumeX; 00101 double VolumeY; 00102 double VolumeZ; 00103 double Kx; 00104 double Ky; 00105 double Kz; 00106 double NormalizedShapeIndex; 00107 vtkTimeStamp ExecuteTime; 00108 00109 private: 00110 vtkMassProperties(const vtkMassProperties&); // Not implemented. 00111 void operator=(const vtkMassProperties&); // Not implemented. 00112 }; 00113 00114 #endif 00115 00116