VTK
dox/Graphics/vtkMassProperties.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMassProperties.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 =========================================================================*/
00038 #ifndef __vtkMassProperties_h
00039 #define __vtkMassProperties_h
00040 
00041 #include "vtkPolyDataAlgorithm.h"
00042 
00043 class VTK_GRAPHICS_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
00044 {
00045 public:
00047   static vtkMassProperties *New();
00048 
00049   vtkTypeMacro(vtkMassProperties,vtkPolyDataAlgorithm);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053   double GetVolume() {this->Update(); return this->Volume;}
00054 
00060   double GetVolumeProjected() {this->Update(); return this->VolumeProjected;}
00061 
00063 
00065   double GetVolumeX() {this->Update(); return this->VolumeX;}
00066   double GetVolumeY() {this->Update(); return this->VolumeY;}
00067   double GetVolumeZ() {this->Update(); return this->VolumeZ;}
00069 
00071 
00073   double GetKx() {this->Update(); return this->Kx;}
00074   double GetKy() {this->Update(); return this->Ky;}
00075   double GetKz() {this->Update(); return this->Kz;}
00077 
00079   double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
00080 
00082   double GetMinCellArea() {this->Update(); return this->MinCellArea;}
00083 
00085   double GetMaxCellArea() {this->Update(); return this->MaxCellArea;}
00086 
00088 
00091   double GetNormalizedShapeIndex()
00092     {this->Update(); return this->NormalizedShapeIndex;}
00094 
00095 protected:
00096   vtkMassProperties();
00097   ~vtkMassProperties();
00098 
00099   virtual int RequestData(vtkInformation* request,
00100                           vtkInformationVector** inputVector,
00101                           vtkInformationVector* outputVector);
00102 
00103   double  SurfaceArea;
00104   double  MinCellArea;
00105   double  MaxCellArea;
00106   double  Volume;
00107   double  VolumeProjected; // == Projected area of triangles * average z values
00108   double  VolumeX;
00109   double  VolumeY;
00110   double  VolumeZ;
00111   double  Kx;
00112   double  Ky;
00113   double  Kz;
00114   double  NormalizedShapeIndex;
00115 
00116 private:
00117   vtkMassProperties(const vtkMassProperties&);  // Not implemented.
00118   void operator=(const vtkMassProperties&);  // Not implemented.
00119 };
00120 
00121 #endif
00122 
00123