VTK  9.3.0
vtkMassProperties.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
31#ifndef vtkMassProperties_h
32#define vtkMassProperties_h
33
34#include "vtkFiltersCoreModule.h" // For export macro
36
37VTK_ABI_NAMESPACE_BEGIN
38class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
39{
40public:
45
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
52 double GetVolume()
53 {
54 this->Update();
55 return this->Volume;
56 }
57
67 {
68 this->Update();
69 return this->VolumeProjected;
70 }
71
75 double GetVolumeX()
76 {
77 this->Update();
78 return this->VolumeX;
79 }
80 double GetVolumeY()
81 {
82 this->Update();
83 return this->VolumeY;
84 }
85 double GetVolumeZ()
86 {
87 this->Update();
88 return this->VolumeZ;
89 }
90
95 double GetKx()
96 {
97 this->Update();
98 return this->Kx;
99 }
100 double GetKy()
101 {
102 this->Update();
103 return this->Ky;
104 }
105 double GetKz()
106 {
107 this->Update();
108 return this->Kz;
109 }
110
115 {
116 this->Update();
117 return this->SurfaceArea;
118 }
119
124 {
125 this->Update();
126 return this->MinCellArea;
127 }
128
133 {
134 this->Update();
135 return this->MaxCellArea;
136 }
137
144 {
145 this->Update();
146 return this->NormalizedShapeIndex;
147 }
148
149protected:
152
154 vtkInformationVector* outputVector) override;
155
159 double Volume;
160 double VolumeProjected; // == Projected area of triangles * average z values
161 double VolumeX;
162 double VolumeY;
163 double VolumeZ;
164 double Kx;
165 double Ky;
166 double Kz;
168
169private:
170 vtkMassProperties(const vtkMassProperties&) = delete;
171 void operator=(const vtkMassProperties&) = delete;
172};
173
174VTK_ABI_NAMESPACE_END
175#endif
virtual void Update()
Bring this algorithm's outputs up-to-date.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
estimate volume, area, shape index of triangle mesh
double GetSurfaceArea()
Compute and return the area.
double GetVolumeProjected()
Compute and return the projected volume.
double GetNormalizedShapeIndex()
Compute and return the normalized shape index.
static vtkMassProperties * New()
Constructs with initial values of zero.
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
double GetMinCellArea()
Compute and return the min cell area.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetVolume()
Compute and return the volume.
~vtkMassProperties() override
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
double GetMaxCellArea()
Compute and return the max cell area.
Superclass for algorithms that produce only polydata as output.