VTK  9.5.20250902
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
50#ifndef vtkMassProperties_h
51#define vtkMassProperties_h
52
53#include "vtkFiltersCoreModule.h" // For export macro
55#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
56
57VTK_ABI_NAMESPACE_BEGIN
58class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkMassProperties : public vtkPolyDataAlgorithm
59{
60public:
65
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
72 double GetVolume()
73 {
74 this->Update();
75 return this->Volume;
76 }
77
87 {
88 this->Update();
89 return this->VolumeProjected;
90 }
91
95 double GetVolumeX()
96 {
97 this->Update();
98 return this->VolumeX;
99 }
100 double GetVolumeY()
101 {
102 this->Update();
103 return this->VolumeY;
104 }
105 double GetVolumeZ()
106 {
107 this->Update();
108 return this->VolumeZ;
109 }
110
115 double GetKx()
116 {
117 this->Update();
118 return this->Kx;
119 }
120 double GetKy()
121 {
122 this->Update();
123 return this->Ky;
124 }
125 double GetKz()
126 {
127 this->Update();
128 return this->Kz;
129 }
130
135 {
136 this->Update();
137 return this->SurfaceArea;
138 }
139
144 {
145 this->Update();
146 return this->MinCellArea;
147 }
148
153 {
154 this->Update();
155 return this->MaxCellArea;
156 }
157
164 {
165 this->Update();
166 return this->NormalizedShapeIndex;
167 }
168
169protected:
172
174 vtkInformationVector* outputVector) override;
175
179 double Volume;
180 double VolumeProjected; // == Projected area of triangles * average z values
181 double VolumeX;
182 double VolumeY;
183 double VolumeZ;
184 double Kx;
185 double Ky;
186 double Kz;
188
189private:
190 vtkMassProperties(const vtkMassProperties&) = delete;
191 void operator=(const vtkMassProperties&) = delete;
192};
193
194VTK_ABI_NAMESPACE_END
195#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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.
#define VTK_MARSHALAUTO