VTK  9.6.1
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
30
31#ifndef vtkMassProperties_h
32#define vtkMassProperties_h
33
34#include "vtkFiltersCoreModule.h" // For export macro
36#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
37
38VTK_ABI_NAMESPACE_BEGIN
39class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkMassProperties : public vtkPolyDataAlgorithm
40{
41public:
46
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
53 double GetVolume()
54 {
55 this->Update();
56 return this->Volume;
57 }
58
68 {
69 this->Update();
70 return this->VolumeProjected;
71 }
72
76 double GetVolumeX()
77 {
78 this->Update();
79 return this->VolumeX;
80 }
81 double GetVolumeY()
82 {
83 this->Update();
84 return this->VolumeY;
85 }
86 double GetVolumeZ()
87 {
88 this->Update();
89 return this->VolumeZ;
90 }
91
96 double GetKx()
97 {
98 this->Update();
99 return this->Kx;
100 }
101 double GetKy()
102 {
103 this->Update();
104 return this->Ky;
105 }
106 double GetKz()
107 {
108 this->Update();
109 return this->Kz;
110 }
111
116 {
117 this->Update();
118 return this->SurfaceArea;
119 }
120
125 {
126 this->Update();
127 return this->MinCellArea;
128 }
129
134 {
135 this->Update();
136 return this->MaxCellArea;
137 }
138
145 {
146 this->Update();
147 return this->NormalizedShapeIndex;
148 }
149
150protected:
153
155 vtkInformationVector* outputVector) override;
156
160 double Volume;
161 double VolumeProjected; // == Projected area of triangles * average z values
162 double VolumeX;
163 double VolumeY;
164 double VolumeZ;
165 double Kx;
166 double Ky;
167 double Kz;
169
170private:
171 vtkMassProperties(const vtkMassProperties&) = delete;
172 void operator=(const vtkMassProperties&) = delete;
173};
174
175VTK_ABI_NAMESPACE_END
176#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
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.
virtual void Update()
Bring this algorithm's outputs up-to-date.
#define VTK_MARSHALAUTO